libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

issue with uncompressed message from the server when permessage deflation is negotiated

Open ber1rand opened this issue 2 years ago • 1 comments

libwebsockets client seems not to deal with Websocket compression extension properly. The Websocket protocol supports compressed and uncompressed frames. libwebsockets return should_do_nothing when received uncompressed message from the server when permessage deflation is negotiated . But it seems it forgets to decrease the length of the recv buffer's length to 0 in this situation, this would cause the do-while loop won't break.

ber1rand avatar Dec 16 '22 04:12 ber1rand

I have the same problem and I think it's caused by this code. Please have a look, thanks very much.

client-parser-ws.c in libwebsockets-4.3.2/lib/roles/ws/ Lark20221216-160527

No problem here in ops-ws.c img_v2_1b9ecc66-5d2f-4a2e-997b-5f22c5fc210h

spiritlcx avatar Dec 16 '22 08:12 spiritlcx