summaryrefslogtreecommitdiff
path: root/lib/rubygems/spec_fetcher.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-07 04:06:30 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-07 04:06:30 +0000
commit9926b16d358f218776b8ae573ea775011fd367cd (patch)
tree2d3053550c203b53d2a6d6653a21c02fe4615d58 /lib/rubygems/spec_fetcher.rb
parent105361d9d4bb4ee642d367a3652251cd516325bc (diff)
* ChangeLog:
* lib/rubygems/commands/setup_command.rb (class Gem): * lib/rubygems/commands/setup_command.rb (TEXT): * lib/rubygems/spec_fetcher.rb (class Gem): * lib/rubygems/test_utilities.rb (class Gem): * lib/rubygems.rb (module Gem): * test/rubygems/test_gem_commands_setup_command.rb (class TestGemCommandsSetupCommand): * test/rubygems/test_gem_spec_fetcher.rb (Upgraded http): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/spec_fetcher.rb')
-rw-r--r--lib/rubygems/spec_fetcher.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb
index 62613f7a51..31205b9a06 100644
--- a/lib/rubygems/spec_fetcher.rb
+++ b/lib/rubygems/spec_fetcher.rb
@@ -241,7 +241,13 @@ class Gem::SpecFetcher
https_uri.scheme = 'https'
https_uri += '/'
- Gem::RemoteFetcher.fetcher.fetch_path https_uri, nil, true
+ https_uri = URI https_uri.to_s # cast to URI::HTTPS
+
+ begin
+ Gem::RemoteFetcher.fetcher.fetch_path https_uri, nil, true
+ rescue Gem::RemoteFetcher::FetchError => e
+ raise unless e.message =~ / Not Allowed 405 /
+ end
say "Upgraded #{uri} to HTTPS"