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 HttpsConnector::https_only for compatibility with hyper_tls #191

Merged
merged 2 commits into from
May 23, 2023

Conversation

jjant
Copy link
Contributor

@jjant jjant commented Feb 7, 2023

Description

It's convenient to be able to configure this flag after building the HttpsConnector, and hyper_tls has this functionality so this is nice for compatibility.

See smithy-lang/smithy-rs#2316 (comment) for motivation.

@djc
Copy link
Member

djc commented Mar 3, 2023

So I don't mind the use case of enabling force_https after construction, but this API can also be used to do the opposite, which seems potentially trickier? Like, any caller with a &mut HttpsConnector can now stop enforcing the use of HTTPS, which might be the opposite of the caller intentions when passing in a fully-formed HttpsConnector.

If you change this to making it unidirectional (maybe enforce_https()?), I don't see any issues.

@jjant
Copy link
Contributor Author

jjant commented Apr 4, 2023

Thanks for the suggestion, @djc, I've made the change in 6f83fc5.

@djc djc merged commit a407b89 into rustls:main May 23, 2023
@djc
Copy link
Member

djc commented May 23, 2023

Thanks!

@jjant jjant deleted the patch-1 branch May 23, 2023 09:56
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.

2 participants