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

Projects
None yet
2 participants
@ddfreyne
Copy link
Member

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

@ddfreyne ddfreyne force-pushed the gh-1297-http-302-without-location branch from 534b28c to 8457721 Jan 26, 2018

@iay

This comment has been minimized.

Copy link
Contributor

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.

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented Jan 26, 2018

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

@ddfreyne ddfreyne force-pushed the gh-1297-http-302-without-location branch from 8457721 to a1104b5 Jan 26, 2018

@ddfreyne ddfreyne merged commit b1b595a into master Jan 26, 2018

3 checks passed

codecov/patch Coverage not affected when comparing fdb5aaa...a1104b5
Details
codecov/project 98.47% (+0.02%) compared to fdb5aaa
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ddfreyne ddfreyne deleted the gh-1297-http-302-without-location branch Jan 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.