net/http: invalid http request methods accepted in NewRequest and NewRequestWithContext #44291
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?
https://play.golang.org/p/CEpOCUm_RmA
What did you expect to see?
I expected
req
to be nil anderr.Error()
to be"net/http: invalid method foobar"
as pergo/src/net/http/request.go
Lines 845 to 847 in fa6752a
What did you see instead?
A request with an invalid method.
The text was updated successfully, but these errors were encountered: