-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Content encodings can be supplied by multiple Content-Encoding headers or by one header with a comma separated list of encodings as seen here.
The Header map embedded in an http.Request from the Go standard library states that:
Header contains the request header fields either received by the server or to be sent by the client.
If a server received a request with header lines,
Host: example.com
accept-encoding: gzip, deflate
Accept-Language: en-us
fOO: Bar
foo: two
then
Header = map[string][]string{
"Accept-Encoding": {"gzip, deflate"},
"Accept-Language": {"en-us"},
"Foo": {"Bar", "two"},
}
As seen by the Accept-Encoding header, this means a comma separated list of values will be returned as a []string with a single element.
Currently, chi does not make this distinction, and so it is not properly parsing the Content-Encoding header.
I will submit a PR fixing this issue shortly.
VojtechVitek
Metadata
Metadata
Assignees
Labels
No labels