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 default ports by default (probably remove option also) #357
Comments
I can add that |
+1 for omitting by default. I think I was pretty much about to go insane because of this option. Using Google APIs with Excon failed with PS. According to spec it can be indeed omitted http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 |
According to RFC 7230 the Host header should be generated from the requested URI. Ports only belong there if the requested URI is something like |
Yeah, the difficulty comes from Ruby's URI implementation. When it does URI.parse on something it ALWAYS returns an integer port, regardless of whether there was one or not. So it isn't as easy as it could (or perhaps should) be to omit it unless it is included from the outset. |
I would like feedback from excon users (particularly those in this thread that have looked at the |
@geemus so I forgot that
So the easy thing to do is check if |
Yeah. Everything I read at the time I originally implemented things seemed to indicate that there was no harm in either including or omitting the default port. So I thought it would be simpler to not have the exceptional case around defaults, instead simply always including it. And it was simpler, certainly, but has lead to some weird edge cases since though it is technically correct, there are cases where in usage it does not follow this technicality closely. |
This issue has been automatically marked stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as duplicate of #448 |
This will require some fixes in fog (around signing for AWS). So will have to coordinate releases. That said, omitting the ports would simplify (and prevents some gnarly issues that occasionally creep up).
The text was updated successfully, but these errors were encountered: