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

Fix no_proxy behaviour #64

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Fix no_proxy behaviour #64

merged 2 commits into from
Oct 30, 2023

Conversation

christian-van-rensen-tng
Copy link
Contributor

@christian-van-rensen-tng christian-van-rensen-tng commented Jul 28, 2022

As discussed on this stackoverflow thread, the no_proxy environment variable defines a list of hosts, for which the proxy should be bypassed.
The same semantics should probably apply to the p_no_proxy parameter of Net::HTTP class.

At the moment, this method parameter seems to be misinterpreted as a list of proxies that should not be used.

This behaviour was not detected by the existing testcase, because both the destination hostname and the proxy hostname matched the given exclusion suffix.

It might seem surprising that this problem was not detected before, given the long history of the project.
However, the problem only occurs when the proxy is explicitly configured with `Net::HTTP.new(...)``, but not when using the environment variables.

* no_proxy is meant to operate on the destination address, not on the name of the proxy
* if both end with `'.example'`, the test does not nail down the behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants