Skip to content

2.16.2 - Fix WebSocket proxy URL construction and missing configuration parameter

Latest

Choose a tag to compare

@penny-for-vapor penny-for-vapor released this 03 Apr 16:25
· 1 commit to main since this release
90bbbda

What's Changed

Fix WebSocket proxy URL construction and missing configuration parameter by @Weixi779 in #160

Background

I noticed issue #147 regarding the incorrect WebSocket proxy URL construction. I also saw a similar solution proposed
in PR #149 by @GEverding, which correctly identified the root cause of the problem.

However, PR #149 received a change request from @0xTim asking for tests to verify the proxy URI generation. Since that
PR has not been updated, I have created this PR with the complete fix including the requested test modifications.

Changes

1. Fix proxy URL construction order - Fixes #147

  • Changed URL format from ws://host/path:port to ws://host:port/path
  • Updated test assertion in testProxy to expect the correct URL format
  • Credit to @GEverding for identifying this issue in PR #149

2. Add missing configuration parameter

  • Pass configuration parameter when connecting through proxy
  • Ensures client configuration is properly forwarded to the underlying connection

3. Use correct URI form for wss + proxy connections

  • For wss with proxy: use origin-form (/path) after CONNECT tunnel per RFC 7230

Reviewers

Thanks to the reviewers for their help:

This patch was released by @0xTim

Full Changelog: 2.16.1...2.16.2