benoitc / benoitc/http-parser

Parsing string with multiple HTTP requests

Offen
#65 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C
Sterne
345
Forks
94
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Could you please clarify what the behaviour is when execute() gets passed a string with two (or even more) HTTP requests directly behind each other (seperated by "\r\n\r\n").
In my example

```
pars.get_headers()["HOST"]
```

returned the Host field of **both** requests seperated with a comma (although the hosts were the same).

Interestingly

```
pars.get_url()
```

returned just the URL of the **second** request.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reproducing the example through execute(), then inspect how get_headers() and get_url() handle a string containing multiple HTTP requests separated by "\r\n\r\n". Determine and document the expected behavior for multiple requests, including whether both requests should be parsed and how the returned headers and URL should be represented.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, python
Bereich
api, backend
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.