Web::HTTP#_request: allow Rex opt level overrides
Allow overriding options at the Rex level when performing requests via the Auxiliary::Web::HTTP wrapper.bug/bundler_fix
parent
80a8bab02f
commit
b3e828359d
|
@ -271,6 +271,8 @@ class Auxiliary::Web::HTTP
|
|||
method = opts[:method].to_s.upcase || 'GET'
|
||||
url = url.is_a?( URI ) ? url : URI( url.to_s )
|
||||
|
||||
rex_overrides = opts.delete( :rex ) || {}
|
||||
|
||||
param_opts = {}
|
||||
|
||||
if !(vars_get = Auxiliary::Web::Form.query_to_params( url.query )).empty?
|
||||
|
@ -288,7 +290,8 @@ class Auxiliary::Web::HTTP
|
|||
'uri' => url.path || '/',
|
||||
'method' => method,
|
||||
'headers' => headers.merge( opts[:headers] || {} )
|
||||
)
|
||||
# Allow for direct rex overrides
|
||||
).merge( rex_overrides )
|
||||
|
||||
opts['data'] = body if body
|
||||
|
||||
|
|
Loading…
Reference in New Issue