We shouldn't be sending the data on redirect.

As such, we should remove the body from the old request as well as the
Content-Length header.
This commit is contained in:
Ian Cordasco
2013-02-07 22:42:58 -05:00
parent 3299771e34
commit e2ad0d0fe8
+7 -4
View File
@@ -121,10 +121,13 @@ class SessionRedirectMixin(object):
# Remove the cookie headers that were sent.
headers = prepared_request.headers
try:
del headers['Cookie']
except KeyError:
pass
for h in ('Cookie', 'Content-Length'):
try:
del headers[h]
except KeyError:
pass
prepared_request.body = None
resp = self.send(
prepared_request,