[go: nahoru, domu]

Skip to content

Commit

Permalink
add handler.host to filter
Browse files Browse the repository at this point in the history
  • Loading branch information
phuslu committed Apr 4, 2014
1 parent eafa4ff commit 2b65680
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions local/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ def URLFETCH(self, fetchserver, kwargs={}):
response.close()

def do_METHOD(self):
self.host = re.sub(r':\d+$', '', self.headers.get('Host') or urlparse.urlsplit(self.path).netloc if self.command != 'CONNECT' else self.path).strip('[]')
for handler_filter in self.handler_filters:
action = handler_filter.filter(self)
if action:
Expand Down

0 comments on commit 2b65680

Please sign in to comment.