lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.94k stars 548 forks source link

WebSocket: handling masked ping on proper way #344

Closed pontscho closed 2 years ago

pontscho commented 2 years ago

Hi,

in some cases, for example uses k6 (https://k6.io) for performance testing, the client on the other side sends masked ping message and it uses strict protocol checking, in that case Lwan has to send back payload of ping in a pong message unmasked and has to set the FIN flag on the header. In other cases the other side will drop the connection immediately.

I've fixed this issue based on the original behaviour of Lwan.

pontscho

lpereira commented 2 years ago

Patch looks good to me! I'll merge it when I'm near my laptop again. Thanks!

On Mon, May 2, 2022, at 5:21 AM, pontscho wrote:

Hi,

in some cases, for example uses k6 (https://k6.io) for performance testing, the client on the other side sends masked ping message and it uses strict protocol checking, in that case Lwan has to send back payload of ping in a pong message unmasked and has to set the FIN flag on the header. In other cases the other side will drop the connection immediately.

I've fixed this issue based on the original behaviour of Lwan.

pontscho

You can view, comment on, or merge this pull request online at:

https://github.com/lpereira/lwan/pull/344

Commit Summary

(1 file https://github.com/lpereira/lwan/pull/344/files)

— Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/pull/344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGMCDJGCTAQ5RH3MY7LVH63CTANCNFSM5U3WFODA. You are receiving this because you are subscribed to this thread.Message ID: @.***>