benoitc / benoitc/http-parser

Difficult to use when multiple Set-Cookie received

Aperta
#50 5 commenti 0 reazioni 1 assegnatario Rivendicata da @benoitc Vedi su GitHub
improvement
Lingua principale
C
Stelle
345
Fork
94
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When there are duplicate headers, http-parser concatenates them with ', '. This makes it difficult to parse the individual cookies, e.g.:

```
Key1=Value1; path=/; expires=Fri, 19-Jul-24 03:30:12 GMT, Key2=Value2; path=/
```

Splitting on ', ' won't work. Though it can be parsed, but for other headers (maybe non-standard ones) it'll become impossible. If it's too late to make the value a list or something, what about a user-provided header callback that will run on each complete header line?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.