]> Cypherpunks repositories - gostls13.git/commit
net/http: accept empty method in Transport again
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 18 Nov 2015 20:22:29 +0000 (20:22 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 19 Nov 2015 01:35:36 +0000 (01:35 +0000)
commite4a1acced742a53421e22fe498d66c81d623110b
tree4074f3f965c10bf308a2ef44f9709b6cfa084e65
parente8e0d906dc9fef255cb97943c1208ecab3b209b4
net/http: accept empty method in Transport again

Fix regression from https://golang.org/cl/16829 ("require valid methods
in NewRequest and Transport.RoundTrip").

An empty string is a valid method (it means "GET", per the docs).

Fixes #13311

Change-Id: I26b71dc4ccc146498b5d7e38fbe31ed11dd5a6cf
Reviewed-on: https://go-review.googlesource.com/16952
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/net/http/transport.go
src/net/http/transport_test.go