[ruby-core:93349] [Ruby trunk Bug#12724] Net::HTTP#post_form and #get_response do not use ENV proxy as default
From:
merch-redmine@...
Date:
2019-06-24 22:57:40 UTC
List:
ruby-core #93349
Issue #12724 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed Fixed by commit:67723c1e4673253b2f4a2c7204ccab9d0daaaeb9. ---------------------------------------- Bug #12724: Net::HTTP#post_form and #get_response do not use ENV proxy as default https://bugs.ruby-lang.org/issues/12724#change-78860 * Author: aert (Aert van de Hulsbeek) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: 2.3.1 * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- `Net::HTTP#post_form` and `#get_response` use `HTTP.start`, without passing any proxy args to it. As a result, the ENV proxy is not used for these calls. I believe both calls should have the same default behaviour as the more verbose ``` req = Net::HTTP::Post.new(url) http = Net::HTTP.new(url.host, url.port) req.set_form_data(params) response = http.request(req) ``` which does use the ENV proxy setting. If this is not desirable, it would be good if this alternate default behaviour can be included in the `#post_form` and `#get_response` documentation. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>