diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-05 15:04:48 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-05 15:04:48 +0000 |
commit | a1de1fa575786655f5c9960d4b8dcb8db695ccf4 (patch) | |
tree | cd572eab8e89639d428a2aabf1e1d5172c086aaa /lib/net/http/generic_request.rb | |
parent | bd7184b8661f9d517be007b083f4fb874e6ff186 (diff) | |
download | ruby-a1de1fa575786655f5c9960d4b8dcb8db695ccf4.tar.gz |
* lib/net/http/generic_request.rb:
Amazon ECA API and GTE/1.3 disallow requests whose host has port
number if its port number equlas to default port number of the
scheme. [Bug #7650]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http/generic_request.rb')
-rw-r--r-- | lib/net/http/generic_request.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb index e8525b3d15..568131fe8d 100644 --- a/lib/net/http/generic_request.rb +++ b/lib/net/http/generic_request.rb @@ -99,7 +99,14 @@ class Net::HTTPGenericRequest # def exec(sock, ver, path) #:nodoc: internal use only - self['host'] = "#{@uri.host}:#{@uri.port}" if @uri + if @uri + if @uri.port == @uri.default_port + # [Bug #7650] Amazon ECS API and GFE/1.3 disallow extra default port number + self['host'] = @uri.host + else + self['host'] = "#{@uri.host}:#{@uri.port}" + end + end if @body send_request_with_body sock, ver, path, @body |