[Libwebsockets] Server returning multiple protocols in upgrade response

Alan Conway aconway at redhat.com
Sat Nov 26 01:31:44 CET 2016


I am seeing that an lws server does not choose a single protocol from
the list proposed by the client, but echos back the same list that the
client sent. I can reproduce this with the test-server and test-client, 
I go the same result on v2.0.3 and v2.1.0. 

Here's the conversation as seen by wireshark:

GET // HTTP/1.1
Pragma: no-cache
Cache-Control: no-cache
Host: localhost
Origin: http://localhost
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: fa5CMy5EXE6fcPsq2v8aiA==
Sec-WebSocket-Protocol: dumb-increment-protocol,fake-nonexistant-
protocol
Sec-WebSocket-Version: 13

HTTP/1.1 101 Switching Protocols
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Accept: CcN27PWx89CoAu/TzPDZJuHX7vQ=
Sec-WebSocket-Protocol: dumb-increment-protocol,fake-nonexistant-
protocol

Am I missing something? If not I'll raise an issue on github.

Thanks
Alan.



More information about the Libwebsockets mailing list