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

Allow relative HTTP redirects #102

Closed
miso-belica opened this issue Feb 9, 2014 · 2 comments · Fixed by #103
Closed

Allow relative HTTP redirects #102

miso-belica opened this issue Feb 9, 2014 · 2 comments · Fixed by #103
Milestone

Comments

@miso-belica
Copy link

Hi,
can you handle relative redirects for HTTP 300 codes? I know that header Location should always contain absolute URL, but all browsers (and Python requests) handle relative URLs correctly.

For example for this URL http://e107.funsite.cz/ I get Requests_Exception: Only HTTP requests are handled. because of relative redirect via 302 with header Location: news.php.

Thanks

@rmccue rmccue added the Core label Feb 10, 2014
@rmccue
Copy link
Collaborator

rmccue commented Feb 10, 2014

Hmm, strange. I thought Requests already handled this. Thanks for reporting. :)

@rmccue
Copy link
Collaborator

rmccue commented Feb 10, 2014

Aha, apparently we only convert it to an absolute URL if it starts with /. This is the wrong heuristic to use, sorry about that.

@rmccue rmccue added this to the 1.7 milestone Feb 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants