Skip to content
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

backport connection poisoning to hyper 1.x client #3795

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

aajtodd
Copy link
Contributor

@aajtodd aajtodd commented Aug 19, 2024

Motivation and Context

#1925

Description

Backports connection poisoning that hyper 0.14 HTTP client has to the hyper 1.x client.

See also:

Testing

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Would like some additional comments for context, but not a blocker.

Ok(request) => request,
Err(err) => {
return HttpConnectorFuture::ready(Err(ConnectorError::user(err.into())));
}
};
/*let capture_connection = capture_connection(&mut request);
let capture_connection = capture_connection(&mut request);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel like this recently uncommented out chunk could use a comment for some context. Reading the CaptureConnection docs didn't quite clear it up for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is same as the hyper 0.14 implementation. CaptureConnection allows us to capture the actual connection used for the request (once established) and query it for information or in this case poison it so it isn't used again.

@aajtodd aajtodd added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit 6a7dcbe Aug 21, 2024
44 checks passed
@aajtodd aajtodd deleted the atodd/hyper1-conn-poison branch August 21, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants