benoitc / benoitc/http-parser

Difficult to use when multiple Set-Cookie received

Ouverte
#50 5 commentaires 0 réactions 1 personne assignée Réclamée par @benoitc Voir sur GitHub
improvement
Langage dominant
C
Étoiles
345
Forks
94
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.