Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(conn/auto): allow serving connection with upgrade after config
When using hyper_util::server::conn::auto::Builder, if one wants to set http1 or http2 options one has to specialize the struct into Http1Builder or Http2Builder with .http1()/.http2() methods. However, once the struct has been specialized there is no way to go back to the inner Builder to call serve_connection_with_upgrades(): one would need to either add make inner public, add an inner() method to get it back, or add a stub that just calls the method on inner like we have with serve_connection(). Since we already had one for serve_connection(), add an indentical one for serve_connection_with_upgrades() Note that it does not make sense for serve_connection_with_upgrades() to be called without the http feature (I think?), so it has only been implemented for http1 if the http2 feature is set.
- Loading branch information