SNOW-2181459 Update HttpClient to use LaxRedirectStrategy to handle 307 on POST#2311
Open
frosforever wants to merge 1 commit intosnowflakedb:masterfrom
Open
SNOW-2181459 Update HttpClient to use LaxRedirectStrategy to handle 307 on POST#2311frosforever wants to merge 1 commit intosnowflakedb:masterfrom
307 on POST#2311frosforever wants to merge 1 commit intosnowflakedb:masterfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
307 on POST307 on POST
52b601e to
551d756
Compare
Currently used `DefaultRedirectStrategy` will not redirect on `POST` requests when a `307` is received. `LaxRedirectStrategy`, on the other hand, will accept redirects regardless of the method. Snowflake service sometimes returns `307` on `POST`. Discussions with support indicated that while this shouldn't happen it can be returned to the client and should be retried in user code. If the retry strategy in the http client is updated to `LaxRedirectStrategy` there would be no need for users to handle this explicitly.
551d756 to
c8dbffc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently used
DefaultRedirectStrategywill not redirect onPOSTrequests when a307is received.LaxRedirectStrategy, on the other hand, will accept redirects regardless of the method.Snowflake service sometimes returns
307onPOST. Discussions with support indicated that while this shouldn't happen it can be returned to the client and should be retried in user code. If the retry strategy in the http client is updated toLaxRedirectStrategythere would be no need for users to handle this explicitly.Overview
SNOW-XXXXX
Pre-review self checklist
masterbranchmvn -P check-style validate)mvn verifyand inspecttarget/japicmp/japicmp.html)SNOW-XXXX:External contributors - please answer these questions before submitting a pull request. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Issue: This is both the report and the solution to an issue.
Fill out the following pre-review checklist:
@SnowflakeJdbcInternalApi(note that public/protected methods/fields in classes marked with this annotation are already internal)Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.