remove content headers for 303 redirect
when doing a GET request for a 303 redirect clear the Content-Length and Content-Type headers, they are set during the initial POST.
This commit is contained in:
parent
1667e0b7f8
commit
6cd8e08fe3
|
@ -361,6 +361,11 @@ class _HTTPConnection(object):
|
|||
if self.code == 303:
|
||||
new_request.method = "GET"
|
||||
new_request.body = None
|
||||
for h in ["Content-Length", "Content-Type"]:
|
||||
try:
|
||||
del self.request.headers[h]
|
||||
except KeyError:
|
||||
pass
|
||||
new_request.original_request = original_request
|
||||
final_callback = self.final_callback
|
||||
self.final_callback = None
|
||||
|
|
Loading…
Reference in New Issue