]> Cypherpunks repositories - gostls13.git/commit
net/http: remove invalid checks of Request.Proto* for outgoing requests
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Jun 2017 21:43:54 +0000 (21:43 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Jun 2017 23:54:01 +0000 (23:54 +0000)
commita48998beb571ce03650da75326a052991134e5ca
treedcb3ed4a16cae7469bfb7cb5b87bc2bc01c66576
parentcfae35efa582eedb83f483b52fa35cf1269c562d
net/http: remove invalid checks of Request.Proto* for outgoing requests

The net/http package has long documented that Request.ProtoMajor and
Request.ProtoMinor are ignored for outgoing requests (HTTP/1.1 or
HTTP/2 is always used, never HTTP/1.0). There was one part in the code
that was actually checking 1.0 vs 1.1, but it appears to have been
harmless. Remove it.

Fixes #18407

Change-Id: I362ed6c47ca2de7a2fbca917ed3e866273cfe41f
Reviewed-on: https://go-review.googlesource.com/45155
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/request.go
src/net/http/transfer.go