Support chunked request bodies (Transfer-Encoding: chunked)

Aperta
#28 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Start in MaxLib.WebServer/Services/HttpRequestParser.cs at LoadContent, lines 345-351, and inspect the existing response-side chunked support for the decoding pattern. Add request-body handling for Transfer-Encoding: chunked when Content-Length is absent, while preserving rejection and connection closing for mixed headers or non-chunked codings. Done means streamed chunked requests are accepted without a known length and the rejected cases remain rejected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement severity:medium

A request with Transfer-Encoding: chunked currently gets 501 Not Implemented and a closed connection. That is a temporary mitigation for TE.CL request smuggling, not a feature: clients that stream a body without a known length cannot talk to the server. Requests with both Transfer-Encoding and Content-Length, and any coding other than chunked, must stay rejected.

Location: MaxLib.WebServer/Services/HttpRequestParser.cs:345-351 (LoadContent)

Fix: Add a chunked request-body decoder (mirroring the response-side chunked support) and use it when Transfer-Encoding: chunked is present without Content-Length. Keep forcing the connection closed only for the still-rejected cases.

Lingua principale
C#
Stelle
1
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Garados007/MaxLib.WebServer

Tutte le issue di Garados007/MaxLib.WebServer

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.