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
Deprecate omit_default_port option, add include_default_port option #448
base: master
Are you sure you want to change the base?
Conversation
- Port being added to URL can be forced by using include_default_port option - Simplifies some of the port addition code - Break out logic to determine if a default port is logic into its own method - Tests basic cases of scheme+port combinations
Build broke because I didn't use hashrockets in my hashes; will update later and push. |
Someone pointed out that there is at least one case where it should include default port, which is when you specify a URI that explicitly includes it. Maybe we should just use that behavior (instead of a flag). So it would be like:
So if you want to opt-in to including, just put it in your url and otherwise don't. What do you think? |
That sounds cleaner and both the code and tests should be simpler as a result.I will look into this later today. |
Yeah, we just need to make sure and check for the port value in the specific spot in a URL where it would appear, so that it won't be mistaken should it appear in host/path/query or something. My regex-fu has not been tested recently, but was once strong. Just let me know if you have questions or need input on that part of things. |
This issue has been automatically marked stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions. |
Pinning. I have every intention of doing this, just holding off for a major version bump, just in case. |
Makes sense. 👍🏽
On Mon, Jul 30, 2018 at 9:57 AM Wesley Beary ***@***.***> wrote:
Pinning. I have every intention of doing this, just holding off for a
major version bump, just in case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#448 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAANDGLHHei5pegtQCkR3Vjows2Q0deoks5uLx7ngaJpZM4DEjma>
.
--
Sent from my supercomputing distraction machine.
I blog at http://blog.mattgauger.com
|
include_default_port
optionThis is a big change in terms of default functionality, and I suspect it will affect the gem users enough that it is worth considering what kind of version bump it'd require.
Additionally, I'd like to have deprecation warnings when the
omit_default_port
option is used with Excon, but I am not sure which method to add the detection and warning output to. Thoughts?Fixes #357. Per discussion in #357, this should only add the port to the URL when
include_default_port
is specified or the port was included in the original URL.