[Libwebsockets] http client callback owner
joel.winarske at gmail.com
Mon Apr 24 22:33:18 CEST 2017
Yes. I'm up to eleven mount points, and nine plugins. Three mount points
call the same plugin which handles the HTTP stuff.
In the case of the scenario in this thread, my design requirement is to
proxy a WS -> WSS connection through lwsws. It all works short of lwsws
passing an invalid sec-protocol header to the far end server. I hacked up
the http client connect to suppress sending sec-protocol in case of a
WS/WSS http client.
In the case of all the JS WS code I've seen, it suppresses sending the
protocol header unless you specify the protocol name as the second
parameter to the WS constructor.
On Sun, Apr 23, 2017 at 4:54 PM, Andy Green <andy at warmcat.com> wrote:
> On 24 April 2017 05:33:16 GMT+08:00, Joel Winarske <
> joel.winarske at gmail.com> wrote:
> >> Why? Just this --->?
> >I think there should be two unique protocol members for http client
> >1. server protocol. The "Server" side WS protocol name. Used as the
> >value for the "sec-protocol" header.
> >2. callback protocol. The name of the protocol plug-in which handles
> >http client callbacks.
> >I'm running into cases where they are not the same value.
> >Renaming the plugin protocol to match the server isn't a great option.
> Does it help to point out you can associate part or all of a vhost's URL
> space with a protocol using mounts?
> There is a CALLBACK mount type that directs the http stuff to the protocol
> handler named in the origin part of the mount. In the JSON config it's
> like this in the mount definition
> "origin": "callback://protocol-lws-messageboard",
> This gives you a lot more flexibility in terms of supporting multiple
> things in one vhost at different URLs.
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets