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
Member

ddfreyne 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

This comment has been minimized.

Show comment
Hide comment
@iay

iay Jan 26, 2018

Contributor

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.

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.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Jan 26, 2018

Member

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

Member

ddfreyne commented Jan 26, 2018

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

@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