pact-reference icon indicating copy to clipboard operation
pact-reference copied to clipboard

Upgrade Hyper and Rustls in Pact Rust mock server

Open rholshausen opened this issue 9 months ago • 1 comments

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.

rholshausen avatar May 07 '24 04:05 rholshausen

🤖 Great news! We've labeled this issue as smartbear-supported and created a tracking ticket in PactFlow's Jira (PACT-1973). We'll keep work public and post updates here. Meanwhile, feel free to check out our docs. Thanks for your patience!

github-actions[bot] avatar May 07 '24 04:05 github-actions[bot]