HttpParser and multiple concatenated HTTP responses
- Vorherrschende Sprache
- C
- Sterne
- 345
- Forks
- 94
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi!
If my understanding is correct HttpParser.execute returns the number of bytes consumed, hence it is possible to parse multiple concatenated HTTP responses by checking is_message_complete() and starting a new parser from the same very position the last one stopped.
However the observed behavior is very different: execute() happily consumes the whole string, the subsequent responses text ends up in the message body and _clen_rest is negative.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start by reproducing the concatenated-response case around HttpParser.execute() and is_message_complete(), then inspect how _clen_rest is updated when a response ends. Done means the parser reports the first response boundary without placing subsequent response text in the body, so another parser can start at the returned position.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, python
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100