fix handling of '100 Continue' responses
git-svn-id: file:///home/svn/framework3/trunk@9444 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
eee1194e82
commit
394f292c4a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue