minor simplifications

This commit is contained in:
Maximilian Hils 2016-04-02 22:00:14 +02:00
parent 050431fdd6
commit a267934d99
2 changed files with 1 additions and 4 deletions

View File

@ -184,9 +184,6 @@ class HTTPRequest(MessageMixin, Request):
def __hash__(self):
return id(self)
def set_auth(self, auth):
self.data.headers.set_all("Proxy-Authorization", (auth,))
def replace(self, pattern, repl, *args, **kwargs):
"""
Replaces a regular expression pattern with repl in the headers, the

View File

@ -184,7 +184,7 @@ class HttpLayer(Layer):
flow.request = request
# set upstream auth
if self.mode == "upstream" and self.config.upstream_auth is not None:
flow.request.set_auth(self.config.upstream_auth)
self.data.headers["Proxy-Authorization"] = self.config.upstream_auth
self.process_request_hook(flow)
if not flow.response: