-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ch3113] My original intent was to use [`http4s`'s `FollowRedirect` client middleware](https://github.com/http4s/http4s/blob/v0.19.0/client/src/main/scala/org/http4s/client/middleware/FollowRedirect.scala#L39) to follow the redirects. However, that middleware does not forward query strings, breaking every request made by `FollowRedirect`. In order to try this I had to refactor all the request signing into a client middleware (`AwsV4Signing`). The current implementation does not use `FollowRedirect`, but I decided to keep `AwsV4Signing` since it simplifies stuff. This is working just fine for `301`s and will probably work for Slalom, but I still need to finish a few things: - [ ] Handle `301 Moved Permanently` correctly by storing the redirect URI, rather than the original. We have an extra round trip with every request at the moment. - [ ] Handle more than one redirect. - [ ] Handle `302 Found`, `303 See other`, `307 Temporary Redirect`, and `308 Permanent Redirect`. - [ ] Unit tests for `preflightCheck`. - [ ] Integration tests. Depending on urgency, we can either merge as-is and address the TODOs in another PR or we can wait until I finish the remaining TODOs here.
- Loading branch information
Showing
10 changed files
with
176 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.