You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Run http://play.golang.org/p/SmkSnOoyAC locally. For reference, here is a sample
response from that http server:
HTTP/1.1 200 OK
Custom: a
Custom: b
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Date: Sun, 28 Jul 2013 21:02:11 GMT
What is the expected output?
The documentation for http.Response reads: "If the response had multiple headers
with the same key, they will be concatenated, with comma delimiters. (Section 4.2 of
RFC 2616 requires that multiple headers be semantically equivalent to a comma-delimited
sequence.)"
Given that, I'd expect to see "[a, b]" (a slice containing a single string,
"a, b").
What do you see instead?
"[a b]" (a slice containing two strings, "a" and "b").
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
OS X
Which version are you using? (run 'go version')
1.1
Please provide any additional information below.
It is not obvious to me whether the behavior or the documentation should be changed.
The text was updated successfully, but these errors were encountered:
The docs are out of date and should be updated. The slice is correct.
Not all servers obey the RFC, so converting to a single entry was losing information.
The text was updated successfully, but these errors were encountered: