-
Notifications
You must be signed in to change notification settings - Fork 660
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
pull retry loop forward to cover everything from resolving auth scheme onward #2966
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,32 +52,13 @@ type InputMiddlewareOptions struct { | |
|
||
// AddInputMiddleware adds the middleware for performing checksum computing | ||
// of request payloads, and checksum validation of response payloads. | ||
// | ||
// Deprecated: This internal-only runtime API is frozen. Do not call or modify | ||
// it in new code. Checksum-enabled service operations now generate this | ||
// middleware setup code inline per #2507. | ||
func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) (err error) { | ||
// TODO ensure this works correctly with presigned URLs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (it does) |
||
|
||
// Middleware stack: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is so beyond out-of-date at this point I've just removed it |
||
// * (OK)(Initialize) --none-- | ||
// * (OK)(Serialize) EndpointResolver | ||
// * (OK)(Build) ComputeContentLength | ||
// * (AD)(Build) Header ComputeInputPayloadChecksum | ||
// * SIGNED Payload - If HTTP && not support trailing checksum | ||
// * UNSIGNED Payload - If HTTPS && not support trailing checksum | ||
// * (RM)(Build) ContentChecksum - OK to remove | ||
// * (OK)(Build) ComputePayloadHash | ||
// * v4.dynamicPayloadSigningMiddleware | ||
// * v4.computePayloadSHA256 | ||
// * v4.unsignedPayload | ||
// (OK)(Build) Set computedPayloadHash header | ||
// * (OK)(Finalize) Retry | ||
// * (AD)(Finalize) Trailer ComputeInputPayloadChecksum, | ||
// * Requires HTTPS && support trailing checksum | ||
// * UNSIGNED Payload | ||
// * Finalize run if HTTPS && support trailing checksum | ||
// * (OK)(Finalize) Signing | ||
// * (OK)(Deserialize) --none-- | ||
|
||
// Initial checksum configuration look up middleware | ||
err = stack.Initialize.Add(&setupInputContext{ | ||
err = stack.Initialize.Add(&SetupInputContext{ | ||
GetAlgorithm: options.GetAlgorithm, | ||
RequireChecksum: options.RequireChecksum, | ||
RequestChecksumCalculation: options.RequestChecksumCalculation, | ||
|
@@ -88,7 +69,7 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) | |
|
||
stack.Build.Remove("ContentChecksum") | ||
|
||
inputChecksum := &computeInputPayloadChecksum{ | ||
inputChecksum := &ComputeInputPayloadChecksum{ | ||
EnableTrailingChecksum: options.EnableTrailingChecksum, | ||
EnableComputePayloadHash: options.EnableComputeSHA256PayloadHash, | ||
EnableDecodedContentLengthHeader: options.EnableDecodedContentLengthHeader, | ||
|
@@ -99,7 +80,7 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) | |
|
||
// If trailing checksum is not supported no need for finalize handler to be added. | ||
if options.EnableTrailingChecksum { | ||
trailerMiddleware := &addInputChecksumTrailer{ | ||
trailerMiddleware := &AddInputChecksumTrailer{ | ||
EnableTrailingChecksum: inputChecksum.EnableTrailingChecksum, | ||
EnableComputePayloadHash: inputChecksum.EnableComputePayloadHash, | ||
EnableDecodedContentLengthHeader: inputChecksum.EnableDecodedContentLengthHeader, | ||
|
@@ -115,10 +96,10 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) | |
// RemoveInputMiddleware Removes the compute input payload checksum middleware | ||
// handlers from the stack. | ||
func RemoveInputMiddleware(stack *middleware.Stack) { | ||
id := (*setupInputContext)(nil).ID() | ||
id := (*SetupInputContext)(nil).ID() | ||
stack.Initialize.Remove(id) | ||
|
||
id = (*computeInputPayloadChecksum)(nil).ID() | ||
id = (*ComputeInputPayloadChecksum)(nil).ID() | ||
stack.Finalize.Remove(id) | ||
} | ||
|
||
|
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.
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.
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 know we had this in place since before you made this change, but is it because ContentChecksum is the older way of doing checksums?
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.
Yeah, ContentChecksum is the old MD5, which the recent changes to S3 object integrity effectively removes.