-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hi
I've integrated WebSocket++ in to an existing socket library (with much help from the iostreams transport). All working nicely - thanks for the library!
Next I thought I'd try connecting via a WebSocket supporting proxy (Apache in this case). This is not using CONNECT, it's a GET via the proxy.
So after connecting to the proxy but before initiating the WebSocket++ connection, I do some connection::append_header() calls to set the auth required for the proxy. That works fine, but the actual upgrade request fails since the URI contains only a relative URI. I.e. in hybi13::client_handshake_request():
req.set_method("GET");
req.set_uri(uri->get_resource());
req.set_version("HTTP/1.1");
... and proxies require the full absolute URI. Changing it to:
req.set_method("GET");
req.set_uri(uri->str());
req.set_version("HTTP/1.1");
works well so far both via a proxy and direct.
However, it's probably nicer to stick with a relative URI when connecting directly. Does this make sense? I could make a pull request, though there are many ways it could be done and I'm not really 100% on the WebSocket++ structure at this point, so not sure what way would be considered cleanest...
Anyway, just an idea. Thanks again.
Luke.