Skip to content
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: behavior error when request doesn't have HOST header #31598

Closed
Zheaoli opened this issue Apr 21, 2019 · 2 comments
Closed

net/http: behavior error when request doesn't have HOST header #31598

Zheaoli opened this issue Apr 21, 2019 · 2 comments

Comments

@Zheaoli
Copy link

@Zheaoli Zheaoli commented Apr 21, 2019

Host header may not exist when some of the HTTP library make a request.

https://github.com/golang/go/blob/master/src/net/http/server.go#L982

In net/http, the default code forbade this request.

I think maybe raise warning info is a better idea than this.

@davecheney

This comment has been minimized.

Copy link
Contributor

@davecheney davecheney commented Apr 22, 2019

HTTP/1.1 mandates the Host header MUST (RFC2119) be present.

Which HTTP libraries are sending malformed requests?

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 22, 2019

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.