Skip to content

package:http abstracts request headers as a Map<string, string>; that does not work for repeating headers #24

Closed
@DartBot

Description

@DartBot

Originally opened as dart-lang/sdk#21802

This issue was originally filed by jirkad...@gmail.com


Package http represents request headers as a Map<string, string>, both in requests as well as in responses. That does not work for repeating headers, In that case one needs to fold them into a single string. Which is not always practical or possible.

What steps will reproduce the problem?

The most problematic header is Set-Cookie since the concatenation of multiple cookies into one string is tricky to parse.

Please provide any additional information below.

Some browsers and libraries e.g. http.cookies in Python can deal with folded Set-Cookie headers.

RFC 6265 says "don't do that" (section 3)

Metadata

Metadata

Assignees

Labels

contributions-welcomeContributions welcome to help resolve this (the resolution is expected to be clear from the issue)type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions