aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:10:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:10:23 +0000
commit70a2eb63999265ff7e8d46d1f5b410c8ee3d30d7 (patch)
tree15a61f57c435ea95ddf51cf96dda46e4a6ea2752 /test/net
parentc1652035644c5f52cd91cfb264df5072445f4020 (diff)
downloadruby-70a2eb63999265ff7e8d46d1f5b410c8ee3d30d7.tar.gz
* lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#exec):
handle req['host'] in update_uri. * lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#update_uri): use req['host'] if it is explicitly set. Even if URI is given, it is already used for the initial value of req['host']. Therefore overwritten value should be respected. [Bug #10054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_http.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 9def957b48..704456f3a3 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -563,10 +563,10 @@ module TestNetHTTP_version_1_2_methods
end
def _test_request__uri_host(http)
- uri = URI 'http://example/'
+ uri = URI 'http://other.example/'
req = Net::HTTP::Get.new(uri)
- req['host'] = 'other.example'
+ req['host'] = 'example'
res = http.request(req)