Skip to content

Commit

Permalink
Clear the Host header when following redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Feb 19, 2011
1 parent 907a9b4 commit 5b8b935
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tornado/simple_httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def _on_body(self, data):
new_request.url = urlparse.urljoin(self.request.url,
self.headers["Location"])
new_request.max_redirects -= 1
del new_request.headers["Host"]
new_request.original_request = original_request
self.client.fetch(new_request, self.callback)
self.callback = None
Expand Down

0 comments on commit 5b8b935

Please sign in to comment.