Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with HTTPS endpoints behind a proxy server #14

Open
fpoirotte opened this issue Mar 16, 2022 · 0 comments
Open

Issues with HTTPS endpoints behind a proxy server #14

fpoirotte opened this issue Mar 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@fpoirotte
Copy link

Hello,

The code in pwclient.xmlrpc fails when a proxy server is used (either HTTP or HTTPS) and the remote endpoint is served over HTTPS.

That's because the code attempts to proxy the request using a non-standard way, e.g.

POST https://somehost/api/ HTTP/1.1
...

Instead it should use the standard CONNECT method to first establish an SSL tunnel with the remote server and then send the request the usual way:

CONNECT https://somehost/ HTTP/1.1
(wait for confirmation that the tunnel has been set up)
POST /api/ HTTP/1.1
...

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling#http_tunneling for more information.

Please note that this only affects connects to an HTTPS endpoint behind a proxy. For HTTP endpoints, the current code does a proper job (in this case, using a fully qualified URL is the right way to proxy the request).

Best regards,
François

@stephenfin stephenfin added the bug Something isn't working label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants