[Libwebsockets] HS: WS upgrade response not 101

Andy Green andy at warmcat.com
Thu Apr 4 18:59:58 CEST 2019



On April 4, 2019 7:20:17 PM GMT+08:00, AL <al at cyberversion.com> wrote:
>Hi,
>
>I'm using libwebsocket through a third party framework (cocos2dx 
>3.17.1). When they upgraded to libwebsocket 2.4.2, the client connected
>
>to my websocket server broke with
>
>  HS: WS upgrade response not 101
>
>error. I tested with libwebsocket directly, it has the same error. The 
>previous libwebsocket cocos2dx uses can work fine, and I can't find
>much 
>of this error. What could be wrong?

The error is pretty clear... the server refused the upgrade.

>The websocket server is Websocket-Csharp
>
>https://github.com/sta/websocket-sharp

The server can refuse the ws upgrade for any reason, it can have any policy about rejecting connections, or bugs or quirks in exactly what it would accept.  Or of course lws may have broken something.

You need to debug this starting from verbose server logs and / or dumping the request / response headers.

-Andy

>-- 
>Robin
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>https://libwebsockets.org/mailman/listinfo/libwebsockets


More information about the Libwebsockets mailing list