Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to explicit redirect handling #13

Closed
codingjoe opened this issue Feb 17, 2016 · 4 comments
Closed

Switch to explicit redirect handling #13

codingjoe opened this issue Feb 17, 2016 · 4 comments

Comments

@codingjoe
Copy link
Contributor

The implicit status code handling for redirects will moste likely misbehave if any other than a 200 response code provides a location.

A good example would be a 201 CREATED, should include a location header.

I guess it makes more sense to filter for 3xx status codes rather than NOT 200.

@Miserlou
Copy link
Owner

Good catch!

@codingjoe
Copy link
Contributor Author

if response.status_code[0] == 3 and response.has_header('Location'):

Note:
307 and 308 want you to use the same METHOD as the original request. This is something your javascript code doesn't do yet.

@Miserlou
Copy link
Owner

Send a PR please! (And if you have any DCC-type contributions to make, those would be appreciated as well!)

@codingjoe
Copy link
Contributor Author

haha, ok will do.

Miserlou pushed a commit that referenced this issue Feb 26, 2016
Fixes #13 -- Adds support for various 3** HTTP respones
Miserlou pushed a commit that referenced this issue Feb 26, 2016
Revert "Fixes #13 -- Adds support for various 3** HTTP respones"
Miserlou pushed a commit that referenced this issue Feb 26, 2016
Fixes #13 -- Adds support for various 3** HTTP respones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants