зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
bd7184b866
Коммит
a1de1fa575
|
@ -1,3 +1,10 @@
|
|||
Sat Jan 5 21:15:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* 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]
|
||||
|
||||
Sat Jan 5 13:58:59 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* doc/syntax/modules_and_classes.rdoc: Improved description of methods
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче