You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
andrewhickman opened this issue
Aug 18, 2022
· 1 comment
· Fixed by #2953
Labels
A-docsArea: documentation.C-bugCategory: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.
Version
git bisect says the first bad commit is 0c8ee93
Platform
64-bit (Windows)
Description
When running the http_proxy example, it does not work with powershell's Invoke-WebRequest -Proxy command.
Server output:
> cargo run --features=full --example http_proxy
Listening on http://127.0.0.1:8100
req: Request { method: CONNECT, uri: example.com:443, version: HTTP/1.1, headers: {"host": "example.com:443", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.19042; en-GB) PowerShell/7.2.5"}, body: Body(Empty) }
upgrade error: upgrade expected but low level API in use
Client output:
> Invoke-WebRequest https://example.com -Proxy http://127.0.0.1:8100
Invoke-WebRequest: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
Using the previous commit, I get the expected client output:
Thanks for noticing this! I think the fix is just adding .with_upgrades() after .serve_connection in the example. Would you like to file a PR fixing it? :D
A-docsArea: documentation.C-bugCategory: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.
Version
git bisect says the first bad commit is 0c8ee93
Platform
64-bit (Windows)
Description
When running the
http_proxy
example, it does not work with powershell'sInvoke-WebRequest -Proxy
command.Server output:
Client output:
Using the previous commit, I get the expected client output:
I will test with curl when I get a chance
The text was updated successfully, but these errors were encountered: