restclient-cpp
restclient-cpp copied to clipboard
Proxy tunnel is enabled on all connections
Expected behaviour
A request to a insecure (HTTP) web server returns a response when the connection is proxied.
Actual behaviour
A request to a insecure (HTTP) web server returns an empty response when the connection is proxied.
< HTTP/1.1 200 Connection established
<
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
> POST /api/hello HTTP/1.1
Host: localhost
User-Agent: restclient-cpp/0.5.2
Accept: */*
Content-Type: application/json
Content-Length: 172
* Empty reply from server
* Closing connection 0
The proxy server is not configured to accept HTTP CONNECT requests on port 80 (AFAICT). I will need to confirm, but either the option to disable the tunnel (CURLOPT_HTTPPROXYTUNNEL
) or detect a secure (HTTPS) connection and enabled it when necessary will resolve this issue.