[Libwebsockets] HS: WS upgrade response not 101

Andy Green andy at warmcat.com
Fri Apr 5 15:34:54 CEST 2019



On 05/04/2019 20:06, AL wrote:
> Noe, it did not work. This is the setup.

>      clientConnectInfo.ssl_connection |= LCCSCF_PIPELINE;
> 
>      printf("Connecting to %s://%s:%d%s \n\n", urlProtocol, 
> clientConnectInfo.address, clientConnectInfo.port, urlPath);
> 
>      // Connect with the client info
>      lws_client_connect_via_info(&clientConnectInfo);

Something is fishy somewhere... 2.4.2 you mentioned (actually, 
v2.4-stable referenced here) doesn't have the code to produce your problem

https://libwebsockets.org/git/libwebsockets/tree/lib/client/client.c?h=v2.4-stable#n1227

         if (wsi->do_ws) {
                 p += sprintf(p, "Upgrade: websocket\x0d\x0a"
                                 "Connection: Upgrade\x0d\x0a"
                                 "Sec-WebSocket-Key: ");

The advice I gave...

> Andy Green wrote on 05-Apr-19 6:48 PM:
>> On 05/04/2019 17:39, AL wrote:
>>
>> I guess it finds this confusing.
>>
>>> Connection: close, Upgrade
>>
>> If you set, on your client connection info
>>
>>     i->ssl_connection |= LCCSCF_PIPELINE;
>>
>> it should remove the "close," part it doesn't like.

... is correct for master, which can produce that Connection string.

-Andy

>> -Andy
> 


More information about the Libwebsockets mailing list