backport r36476 #241

Closed
wants to merge 4 commits into
from

3 participants

@tamird
tamird commented Jan 25, 2013

backport http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/36476 to make Net::HTTP respect http_proxy environment variables.

drbrain and others added some commits Jul 20, 2012
@drbrain @square-build-bot drbrain * lib/net/http.rb: Net::HTTP now automatically detects and uses
  proxies from the environment.  A proxy may also be specified as
  before.

  Net::HTTP::Proxy still creates anonymous classes, but these classes
  are only used to store configuration information.  When an HTTP
  instance is created the configuration is now copied.

  Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP

  [Feature #6546]
* lib/open-uri.rb:  Moved URI::Generic#find_proxy to uri/generic.
* lib/uri/generic.rb:  Imported find_proxy from open-uri.
* test/open-uri/test_open-uri.rb:  Moved proxy-discovery tests to URI.
* test/uri/test_generic.rb:  Imported proxy-discovery tests from
  open-uri.
* test/net/http/test_http.rb:  Added tests for proxy behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Conflicts:
	ChangeLog
	lib/net/http.rb
	test/uri/test_generic.rb
a36cc8f
@nurse @square-build-bot nurse * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
* lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
  not given.

* lib/net/http.rb (Net::HTTP#initialize): ditto.

* lib/net/http.rb (Net::HTTP#proxy?): return true or false.

* lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.

* lib/net/http.rb (Net::HTTP#proxy_port): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Conflicts:
	ChangeLog
ce1f38a
@nurse @square-build-bot nurse Set false to @proxy_from_env to suppress uninitialized warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
79153f1
@tamird tamird collateral changes to make backported tests from #36476 pass bfa0c49
@drbrain
Member
drbrain commented Jan 25, 2013

This is a new feature for 1.9.3 so it will be rejected.

PS: You need to make back port requests here: https://bugs.ruby-lang.org/projects/ruby-193/issues/new and list the subversion commits that need to be backported.

@drbrain drbrain closed this Jan 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment