]> Cypherpunks repositories - gostls13.git/commit
net/http: make NewRequest with empty method mean GET
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 10 Dec 2015 18:24:03 +0000 (10:24 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 10 Dec 2015 18:51:50 +0000 (18:51 +0000)
commit8233ecd1b284170695d1d1b501dfab03921f3e20
treee4569d7b93d44acdebf867ab3dcb6a903ba3e9de
parent9d6e4b7e3acadf358eb5d809ec50a0c7cbe2365b
net/http: make NewRequest with empty method mean GET

Until recently, we always permitted an empty string to NewRequest.
Keep that property, since it broke tests within in Google when trying
out Go 1.6, and probably would've broken others too.

Change-Id: Idddab1ae7b9423d5caac00af2c897fe1065b600b
Reviewed-on: https://go-review.googlesource.com/17699
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/request.go
src/net/http/request_test.go