Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: redirect on 308 (Permanent Redirect) too #876
fix: redirect on 308 (Permanent Redirect) too #876
Changes from 1 commit
55a16ec
de58f1c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about 309 to 399? These are all undefined redirect codes according to HTTP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the method name should really be
isDefinedRedirect
or such, given where this code is used to handle automatic redirection. The Javadoc at least describes the behavior correctly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior for other 3xx codes is not defined in docs or tests. I suspect the current behavior in this case never got much thought.
Think of it this way: if we do see a 315 code what should we do with it? The answer is treat it as a redirect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't disagree. The library could be modified to redirect on all 3xx, but I don't feel like I will introduce that kind of behavior change myself right now. That sounds like we need more discussions, and I don't feel confident to introduce such a change, as I don't think I have enough expertise on this matter. For now, I will just allow redirecting 308 that at least should have been covered here. Nothing more, just one change that I believe should be fixed at least.