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

add: take_io method to LazyConfigAcceptor #145

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

jacott
Copy link
Contributor

@jacott jacott commented May 31, 2023

The take_io method can be used to take back ownership of the client IO stream when an error occurs during clientHello handshake.

An example of this is when a client tries to connect to an TLS socket expecting it to be plain text connection. In this case take_io can be used to send a 400 response, "The plain HTTP request was sent to HTTPS port", back to the client.

The `take_io` method can be used to take back ownership of the client IO stream when an error occurs
during clientHello handshake.

An example of this is when a client tries to connect to an TLS socket expecting it to be plain text
connection. In this case take_io can be used to send a 400 response, "The plain HTTP request was
sent to HTTPS port", back to the client.
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

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

This looks okay to me, thanks!

@quininer quininer merged commit fcbae20 into tokio-rs:master Jun 6, 2023
@quininer
Copy link
Member

quininer commented Jun 6, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants