]> Cypherpunks repositories - gostls13.git/commit
net/http: Transport: be paranoid about any non-100 1xx response
authorBrad Fitzpatrick <bradfitz@golang.org>
Sun, 31 Mar 2013 05:59:08 +0000 (22:59 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 31 Mar 2013 05:59:08 +0000 (22:59 -0700)
commitb80ce2034bd04b23cb9b4330aea3d390b2f0df3a
tree1b063de7bab046415676b8ce4ab56928bd13347f
parent59ae9d9ac9234b07c9940fa617ca09a4f43d352c
net/http: Transport: be paranoid about any non-100 1xx response

Since we can't properly handle anything except 100, treat all
1xx informational responses as sketchy and don't reuse the
connection for future requests.

The only other 1xx response code currently in use in the wild
is WebSockets' use of "101 Switching Protocols", but our
code.google.com/p/go.net/websockets doesn't use Client or
Transport: it uses ReadResponse directly, so is unaffected by
this CL.  (and its tests still pass)

So this CL is entirely just future-proofing paranoia.
Also: the Internet is weird.

Update #2184
Update #3665

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8208043
src/pkg/net/http/serve_test.go
src/pkg/net/http/transport.go
src/pkg/net/http/transport_test.go