pact-reference
pact-reference copied to clipboard
Upgrade Hyper and Rustls in Pact Rust mock server
Current Hyper is locked to 0.14.x, Rustls to 0.24.x and tokio-rustls to 0.24.x. To upgrade the TLS crates seems to need Hyper to be upgraded to 1.0+.
The current mock server implementation was written in 2017-2019, and contains some esoteric TLS code that may be more complex to upgrade to Hyper 1.0 than to rewrite it using newer Hyper 1.0 constructs.
Upgrading to Hyper 1.0 will also give the following benefits:
- Supports both HTTP 1 and 2 with the same server implementation
- Supports protocol upgrades (leading to supporting things like Web Sockets)
- Middleware support
- No more need for the custom TLS code
A suggestion is to split this component out into it's own repository, so that we can easily support a 1.0.x version as well as a 2.0.x version using branches.