-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: incorrectly redirect (301) if request payload include port number #51892
Comments
CC @neild |
Is this issue new in 1.18, or does it reproduce with older releases? |
exists in go1.17.8 windows/amd64 too |
The authority form is only valid for |
Is this actually a problem? And if so, what should the correct behavior be? The surprise is that you can provide a URL with a non- |
The correct behavior is probably to reject the request like we do if the request line doesn't contain a port. RFC 7230 Section 5.3.3 says the authority form is only used for CONNECT.
|
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?
server.go
client.go
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: