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:
parent
d9d4a28f1c
commit
22a4e6ac7a
@ -230,7 +230,7 @@ class TestWEBrickHTTPAuth < Test::Unit::TestCase
|
|||||||
log.reject! {|line| pat =~ line }
|
log.reject! {|line| pat =~ line }
|
||||||
}
|
}
|
||||||
assert_equal([], log)
|
assert_equal([], log)
|
||||||
}
|
}
|
||||||
TestWEBrick.start_httpserver({}, log_tester) {|server, addr, port, log|
|
TestWEBrick.start_httpserver({}, log_tester) {|server, addr, port, log|
|
||||||
realm = "wb auth-int realm"
|
realm = "wb auth-int realm"
|
||||||
path = "/digest_auth_int"
|
path = "/digest_auth_int"
|
||||||
|
@ -145,22 +145,23 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
|
|||||||
res.body = dig.hexdigest
|
res.body = dig.hexdigest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
http = Net::HTTP.new(o_addr, o_port)
|
|
||||||
IO.pipe do |rd, wr|
|
http = Net::HTTP.new(o_addr, o_port)
|
||||||
headers = {
|
IO.pipe do |rd, wr|
|
||||||
'Content-Type' => 'application/octet-stream',
|
headers = {
|
||||||
'Transfer-Encoding' => 'chunked',
|
'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 = Net::HTTP::Post.new('/', headers)
|
||||||
post.body_stream = rd
|
th = Thread.new { nr.times { wr.write(rand_str) }; wr.close }
|
||||||
http.request(post) do |res|
|
post.body_stream = rd
|
||||||
assert_equal 'text/plain', res['content-type']
|
http.request(post) do |res|
|
||||||
assert_equal 32, res.content_length
|
assert_equal 'text/plain', res['content-type']
|
||||||
assert_equal exp, res.body
|
assert_equal 32, res.content_length
|
||||||
end
|
assert_equal exp, res.body
|
||||||
assert_nil th.value
|
|
||||||
end
|
end
|
||||||
|
assert_nil th.value
|
||||||
|
end
|
||||||
|
|
||||||
TestWEBrick.start_httpproxy do |p_server, p_addr, p_port, p_log|
|
TestWEBrick.start_httpproxy do |p_server, p_addr, p_port, p_log|
|
||||||
http = Net::HTTP.new(o_addr, o_port, p_addr, p_port)
|
http = Net::HTTP.new(o_addr, o_port, p_addr, p_port)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user