Skip to content

Commit

Permalink
ProxyServer::Connection: Use Arachni::HTTP::Client.headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zapotek committed Jul 6, 2017
1 parent 016b159 commit 5676fa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/arachni/http/proxy_server/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def initialize( options = {} )
url: sanitize_url( @parser.request_url, headers ),
method: method,
body: @body,
headers: headers
headers: Arachni::HTTP::Client.headers.to_h.merge( headers )
)
)

Expand Down Expand Up @@ -296,7 +296,7 @@ def cleanup_request_headers( headers )
headers.delete name
end

headers
headers.to_h
end

def cleanup_response_headers( headers )
Expand Down
1 change: 1 addition & 0 deletions spec/arachni/http/proxy_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def test_proxy( proxy )
"Accept: */*\r\n" <<
"Content-Length: 7\r\n" <<
"Accept-Language: en-US,en;q=0.8,he;q=0.6\r\n" <<
"#{Arachni::HTTP::Client::SEED_HEADER_NAME}: #{Arachni::Utilities.random_seed}\r\n" <<
"Content-Type: application/x-www-form-urlencoded\r\n\r\n").split( "\r\n" ).sort
)

Expand Down

0 comments on commit 5676fa4

Please sign in to comment.