The authority form is only valid for CONNECT, looks like with other methods, net/http just passes the url straight to net/url.ParseRequestURI which parses localhost:80 as scheme: localhost and opaque: 80. Without a parse error, net/http doesn't return a BadRequest.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
What did you expect to see?
HTTP/1.1 400 Bad Request
What did you see instead?
HTTP/1.1 301 Moved Permanently
The text was updated successfully, but these errors were encountered: