[Libwebsockets] Behaviour when server masks?

Andy Green andy at warmcat.com
Wed Nov 10 17:30:41 CET 2021



On 11/10/21 15:47, Felipe Gasper wrote:
> Hi Andy et al.,
> 
> 	I was recently writing some tests against Net::Libwebsockets and noticed that, when the server sends a masked frame, LWS as client doesn’t trigger a 1002 failure as RFC 6455 mandates (5.1).
> 
> 	Is this an intended divergence from the specification?

It was a long time ago, but as I recall since there's a bit telling 
whether to use the mask, it didn't seem important.  I guess the idea is 
they didn't want any divergence between what an intermediary may see who 
ignores or doesn't ignore the server-side mask, and what the endpoint 
sees who may have a different plan about the serverside mask bit 
observance if it wasn't strictly specified.

Does this help?

https://libwebsockets.org/git/libwebsockets/commit?id=7a9cd6a4755e73cf610362d3b76ec4ef9b821e5d

-Andy


More information about the Libwebsockets mailing list