You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problems with the "allow_redirects" to the Request object. It seems that if you specify "allow_redirects=False" it still follows redirects. I think I've found the source of the problem on line 169 in models.py:
while (
('location' in r.headers) and
((self.method in ('GET', 'HEAD')) or
(r.status_code is 303) or
(self.allow_redirects))
):
Shouldt the or (self.allow_redirects) be and (self.allow_redirects)?
The text was updated successfully, but these errors were encountered:
When allow_redirects is set to True, the redirection of non-GET/HEAD requests is allowed. RFC 2616 10.3 says that these redirects should only occur w/ permission of the user (therefore, the flag).
When allow_redirects is set to False (default), GET and HEAD requests are redirected as usual, and a 301 result of a POST, will not be redirected.
Hi,
I have problems with the "allow_redirects" to the Request object. It seems that if you specify "allow_redirects=False" it still follows redirects. I think I've found the source of the problem on line 169 in models.py:
Shouldt the
or (self.allow_redirects)
beand (self.allow_redirects)
?The text was updated successfully, but these errors were encountered: