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

Handle HTTP 302 without Location #1302

Merged
merged 1 commit into from Jan 26, 2018

Conversation

denisdefreyne
Copy link
Member

@denisdefreyne denisdefreyne commented Jan 26, 2018

Fixes #1297.

A HTTP 3xx header without Location is now an explicit error:

broken reference to http://example.com/x: redirection without a target location

@iay
Copy link
Contributor

iay commented Jan 26, 2018

Silently ignoring it is better than crashing, for sure. However, I think if the response is out of spec because the Location is missing (and I should really look at the spec) then I'd want it to be flagged as an error rather than ignored. After all, if it's broken in that way my reference to it isn't likely to be intentional; if it is, I can always exclude it from the checks.

@denisdefreyne
Copy link
Member Author

@iay I just changed the behavior — probably while you were typing — to raise an error in that case!

@denisdefreyne denisdefreyne force-pushed the gh-1297-http-302-without-location branch from 8457721 to a1104b5 Compare January 26, 2018 07:51
@denisdefreyne denisdefreyne merged commit b1b595a into master Jan 26, 2018
@denisdefreyne denisdefreyne deleted the gh-1297-http-302-without-location branch January 26, 2018 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants