зеркало из https://github.com/github/ruby.git
adjust indents [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d9d4a28f1c
Коммит
22a4e6ac7a
|
@ -230,7 +230,7 @@ class TestWEBrickHTTPAuth < Test::Unit::TestCase
|
|||
log.reject! {|line| pat =~ line }
|
||||
}
|
||||
assert_equal([], log)
|
||||
}
|
||||
}
|
||||
TestWEBrick.start_httpserver({}, log_tester) {|server, addr, port, log|
|
||||
realm = "wb auth-int realm"
|
||||
path = "/digest_auth_int"
|
||||
|
|
|
@ -145,22 +145,23 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
|
|||
res.body = dig.hexdigest
|
||||
end
|
||||
end
|
||||
http = Net::HTTP.new(o_addr, o_port)
|
||||
IO.pipe do |rd, wr|
|
||||
headers = {
|
||||
'Content-Type' => 'application/octet-stream',
|
||||
'Transfer-Encoding' => 'chunked',
|
||||
}
|
||||
post = Net::HTTP::Post.new('/', headers)
|
||||
th = Thread.new { nr.times { wr.write(rand_str) }; wr.close }
|
||||
post.body_stream = rd
|
||||
http.request(post) do |res|
|
||||
assert_equal 'text/plain', res['content-type']
|
||||
assert_equal 32, res.content_length
|
||||
assert_equal exp, res.body
|
||||
end
|
||||
assert_nil th.value
|
||||
|
||||
http = Net::HTTP.new(o_addr, o_port)
|
||||
IO.pipe do |rd, wr|
|
||||
headers = {
|
||||
'Content-Type' => 'application/octet-stream',
|
||||
'Transfer-Encoding' => 'chunked',
|
||||
}
|
||||
post = Net::HTTP::Post.new('/', headers)
|
||||
th = Thread.new { nr.times { wr.write(rand_str) }; wr.close }
|
||||
post.body_stream = rd
|
||||
http.request(post) do |res|
|
||||
assert_equal 'text/plain', res['content-type']
|
||||
assert_equal 32, res.content_length
|
||||
assert_equal exp, res.body
|
||||
end
|
||||
assert_nil th.value
|
||||
end
|
||||
|
||||
TestWEBrick.start_httpproxy do |p_server, p_addr, p_port, p_log|
|
||||
http = Net::HTTP.new(o_addr, o_port, p_addr, p_port)
|
||||
|
|
Загрузка…
Ссылка в новой задаче