benoitc / benoitc/http-parser

Difficult to use when multiple Set-Cookie received

Open
#50 5 comments 0 reactions 1 assignee Claimed by @benoitc View on GitHub
improvement
Dominant language
C
Stars
345
Forks
94
PR merge metrics
No merged PRs in 30d

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.