-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Should include port in host header #28
Comments
Sounds like an oversight. Yes send a patch! Thanks. Loïc Hoguin -------- Original Message --------
|
Wish I could/knew how to attach a pull request to an existing issue. Anyways, see #29 for the code. |
Well I prefer them to be separate. :-) I'll look soon, thanks. |
Done. |
Per section 14.23 of the HTTP spec, gun should include the port along with the hostname in the host header.
the request function in gun_http.erl should have line 196 and line 210 read something like:
Then you'd have to pass in the port from the main gun loop and change the other protocol
request
callback methods to match.I didn't do this because the workaround is just to specify the host header yourself, there isn't a test suite, and I wasn't sure if someone had other opinions. I'm willing to submit some actual code if that's desired, though.
FYI, this is causing issues when we use gun to test a cowboy server, and cowboy uses the host header (apparently) to determine the port, thus passing an incorrect port number (80 instead of 8080).
The text was updated successfully, but these errors were encountered: