Commit 2e250b43 authored by Greg Ward's avatar Greg Ward

Fix bug #511786 (2.2.1 candidate): ensure that custom-supplied headers

are preserved for redirected requests.
parent aeff6687
...@@ -416,7 +416,7 @@ class HTTPRedirectHandler(BaseHandler): ...@@ -416,7 +416,7 @@ class HTTPRedirectHandler(BaseHandler):
# XXX Probably want to forget about the state of the current # XXX Probably want to forget about the state of the current
# request, although that might interact poorly with other # request, although that might interact poorly with other
# handlers that also use handler-specific request attributes # handlers that also use handler-specific request attributes
new = Request(newurl, req.get_data()) new = Request(newurl, req.get_data(), req.headers)
new.error_302_dict = {} new.error_302_dict = {}
if hasattr(req, 'error_302_dict'): if hasattr(req, 'error_302_dict'):
if len(req.error_302_dict)>10 or \ if len(req.error_302_dict)>10 or \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment