* allow a request to pass a timeout (and by allowing passing a timeout, the ability to not parse the response)

git-svn-id: file:///home/svn/incoming/trunk@3511 4d416f70-5f16-0410-b530-b9f4589650da
unstable
bmc 2006-02-06 20:22:47 +00:00
parent d14646e084
commit 32dfdc114c
1 changed files with 3 additions and 3 deletions

View File

@ -117,8 +117,8 @@ module Exploit::Remote::HttpClient
# #
# Connects to the server, creates a request, sends the request, reads the response # Connects to the server, creates a request, sends the request, reads the response
# #
def request(opts={}) def request(opts={}, timeout = -1)
c = connect c = connect(opts)
if (datastore['HTTP::junk_pipeline'].to_i > 0) if (datastore['HTTP::junk_pipeline'].to_i > 0)
c.junk_pipeline = datastore['HTTP::junk_pipeline'].to_i c.junk_pipeline = datastore['HTTP::junk_pipeline'].to_i
@ -156,7 +156,7 @@ module Exploit::Remote::HttpClient
request.junk_self_referring_directories = 1 request.junk_self_referring_directories = 1
end end
c.send_request(request) c.send_request(request, timeout)
end end
## ##