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

Omit port in Host header for default ports #51

Closed
wants to merge 1 commit into from

Conversation

splattael
Copy link

Hi,

while using rack-reverse-proxy we discovered that proxying to "Apache Coyote" won't work
if the Host header includes the port for default ports (like 80 or 443). E.g.:

Host: example.com:80

In this PR the default port will be skipped in Host header.

Most clients don't set this default port too:

Comments?

Kind regards,
Peter

Setting default port in Host header break some web servers
like "Apache Coyote".

Most clients don't set this default port too:
* request/request#515 (comment)
* https://github.com/ruby/ruby/blob/d46336e71731aa64d71d4573b2741b7de43ec340/lib/net/http/generic_request.rb#L18
@splattael
Copy link
Author

Any comments?

This patch runs in production like a charm for weeks :)

@waterlink
Copy link
Contributor

Looks good, will merge in new main repo: https://github.com/waterlink/rack-reverse-proxy

@waterlink
Copy link
Contributor

Done: waterlink/rack-reverse-proxy#3

@splattael
Copy link
Author

@waterlink Thank you!

I didn't know that @jaswope's repo is dead you have taken over :)

Maybe the README should be updated accordingly?

@waterlink
Copy link
Contributor

Well, good idea
On Jul 5, 2015 10:52 PM, "Peter Suschlik" notifications@github.com wrote:

@waterlink https://github.com/waterlink Thank you!

I didn't know that @jaswope https://github.com/jaswope's repo is dead
you have taken over :)

Maybe the README should be updated accordingly?


Reply to this email directly or view it on GitHub
#51 (comment)
.

@splattael
Copy link
Author

Closing this PR as it has been merged into @waterlink's repo: waterlink/rack-reverse-proxy@026fd7e

Thanks, again!

@splattael splattael closed this Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants