From: shyouhei@... Date: 2016-08-10T03:19:03+00:00 Subject: [ruby-core:76810] [Ruby trunk Bug#11195][Feedback] Add "no_proxy" parameter to Net::HTTP.new Issue #11195 has been updated by Shyouhei Urabe. Status changed from Open to Feedback We looked at this issue at yesterday's developer meeting. We agreed this feature is good, but sadly no active mentor was there for Net::HTTP. Maybe could someone propose us a patch to implement this? ---------------------------------------- Bug #11195: Add "no_proxy" parameter to Net::HTTP.new https://bugs.ruby-lang.org/issues/11195#change-60035 * Author: Charles Nutter * Status: Feedback * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Net::HTTP.new currently accepts parameters for proxy host, proxy port, proxy username, and proxy password. It does not accept an argument for non-proxied addresses, and as a result specifying a proxy host will use that proxy unconditionally. Compare this with the default ENV behavior, which *does* honor the "no_proxy" env var. So the only way you can set up a proxy AND have it honor non-proxied addresses is to use ENV. I propose that we add one more trailing argument for non-proxied hosts, since this is an unavoidable part of http proxying. I would have made the change myself, but it involved a bit more work than just adding the param; the logic for honoring "no_proxy" only exists in the ENV logic, and when specified directly there's no affordance for non-proxied addresses in the rest of net/http. This might be easier if we make uri/generic.rb's find_proxy accept an optional hash from which to look up these values. Then we just store them in Net::HTTP as a local version of ENV. -- https://bugs.ruby-lang.org/ Unsubscribe: