http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.45k stars 119 forks source link

Please make TLS support optional #219

Closed joshtriplett closed 2 years ago

joshtriplett commented 3 years ago

Sometimes, I only need http support, not https; for instance, the instance metadata services in cloud environments only need http. For such cases, I would like to be able to use surf with the async-h1 backend and no TLS stack.

brightly-salty commented 3 years ago

I'd like to take a swing at this and submit a PR if it would be accepted.

Fishrock123 commented 3 years ago

Needs support in http-client. We should support this.

Fishrock123 commented 3 years ago

@brightly-salty are you still interested in this?

I think that the h1_client in http-client already supports running without tls, but surf's feature flags do not.

brightly-salty commented 3 years ago

Sure @Fishrock123 , sorry about that, must've slipped my mind. I'd be happy to work on it, I think it's just making a feature flag and configuring the tls-using code based on that?

Fishrock123 commented 3 years ago

I think it would mostly need to be an alternate feature flag on Surf, probably something like h1-client-no-tls.