net/http: successful CONNECT response shouldn't contain Content-Length #34456
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Write a successful CONNECT response, using either
Response.Write()
orhttputil.DumpResponse()
, like so: https://play.golang.org/p/X5V_Zy51ksSWhat did you expect to see?
Just the HTTP status line:
What did you see instead?
I see the status line, as well as a
Content-Length: 0
header.According to RFC 7231 section 4.3.6:
This causes problems when writing a successful CONNECT response to Safari, which doesn't seem to like the
Content-Length
header.The text was updated successfully, but these errors were encountered: