fix handling of '100 Continue' responses

git-svn-id: file:///home/svn/framework3/trunk@9444 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-06-06 19:48:33 +00:00
parent eee1194e82
commit 394f292c4a
1 changed files with 4 additions and 2 deletions

View File

@ -191,7 +191,8 @@ module Exploit::Remote::HttpClient
r = c.request_raw(opts)
resp = c.send_recv(r, opts[:timeout] ? opts[:timeout] : timeout)
while(resp and resp.code == 100)
resp = c.reread_response(resp, opts[:timeout] ? opts[:timeout] : timeout)
print_status("Got a 100 response, trying to read again")
resp = c.read_response(opts[:timeout] ? opts[:timeout] : timeout)
end
resp
rescue ::Errno::EPIPE, ::Timeout::Error
@ -208,7 +209,8 @@ module Exploit::Remote::HttpClient
r = c.request_cgi(opts)
resp = c.send_recv(r, opts[:timeout] ? opts[:timeout] : timeout)
while(resp and resp.code == 100)
resp = c.reread_response(resp, opts[:timeout] ? opts[:timeout] : timeout)
print_status("Got a 100 response, trying to read again")
resp = c.read_response(opts[:timeout] ? opts[:timeout] : timeout)
end
resp
rescue ::Errno::EPIPE, ::Timeout::Error