Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Apr 17, 2018

Added documentation that explains hyper_tls's default behaviour when a
URL using the HTTP scheme is used. Also added a force_https function
that will force the use of TLS when connecting to a URL.

Kaidan added 2 commits April 17, 2018 20:08
Added documentation that explains hyper_tls's default behaviour when a
URL using the HTTP scheme is used. Also added a force_https function
that will force the use of TLS when connecting to a URL.
@ghost ghost mentioned this pull request Apr 17, 2018
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Cool, looks great!

src/client.rs Outdated
let is_https = dst.scheme() == "https";
// Early abort if TLS is forced but can't be used
if !is_https && self.force_https {
let err = io::Error::new(io::ErrorKind::Other, "TLS forced but TLS can't be used");
Copy link
Member

Choose a reason for hiding this comment

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

I'd probably phrase this HTTPS scheme required or similar.

src/client.rs Outdated
/// This uses hyper's default `HttpConnector`, and default `TlsConnector`.
/// If you wish to use something besides the defaults, use `From::from`.
///
/// # Warning
Copy link
Member

Choose a reason for hiding this comment

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

I'd change this to "Note" instead of "Warning".

Copy link
Author

Choose a reason for hiding this comment

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

I originally had it as Note, i'll change it back.

@seanmonstar seanmonstar merged commit 5598eed into hyperium:master Apr 17, 2018
@seanmonstar
Copy link
Member

Thank you!

@ghost ghost deleted the dev branch April 17, 2018 20:24
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.

1 participant