diff --git a/lib/rex/proto/http/client.rb b/lib/rex/proto/http/client.rb index 41adf30aed..3f85ddd9f8 100644 --- a/lib/rex/proto/http/client.rb +++ b/lib/rex/proto/http/client.rb @@ -209,7 +209,9 @@ class Client req << set_agent_header(c_ag) if (c_auth.length > 0) - req << set_basic_auth_header(c_auth) + unless c_head['Authorization'].include? "Basic" + req << set_basic_auth_header(c_auth) + end end req << set_cookie_header(c_cook) @@ -315,7 +317,9 @@ class Client req << set_agent_header(c_ag) if (c_auth.length > 0) - req << set_basic_auth_header(c_auth) + unless c_head['Authorization'].include? "Basic" + req << set_basic_auth_header(c_auth) + end end req << set_cookie_header(c_cook)