Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove port from Host: header when port == 80 #193

Merged
merged 1 commit into from Feb 28, 2013

Conversation

Projects
None yet
2 participants
Contributor

chrisrhoden commented Apr 29, 2011

Some servers I have interacted with treat Host: example.com:80 as different from Host: example.com, which was resulting in some strange 404 errors.

Remove port from Host: header when port == 80
Some servers I have interacted with treat Host: example.com:80 as different from Host: example.com, which was resulting in some strange 404 errors.

@tmm1 tmm1 commented on the diff Oct 5, 2011

lib/em/protocols/httpclient.rb
@@ -116,7 +116,7 @@ module EventMachine
# Allow an override for the host header if it's not the connect-string.
host = args[:host_header] || args[:host] || "_"
# For now, ALWAYS tuck in the port string, although we may want to omit it if it's the default.
@tmm1

tmm1 Oct 5, 2011

Contributor

Can you kill this comment too?

tmm1 added a commit that referenced this pull request Feb 28, 2013

Merge pull request #193 from chrisrhoden/patch-2
Remove port from Host: header when port == 80

@tmm1 tmm1 merged commit 1a217fa into eventmachine:master Feb 28, 2013

sodabrew pushed a commit to sodabrew/eventmachine that referenced this pull request Jan 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment