Bug 230962 - WebSocket connection terminated when server sends junk
Summary: WebSocket connection terminated when server sends junk
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-09-29 09:37 PDT by Alex Christensen
Modified: 2022-09-12 04:26 PDT (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-09-29 09:37:35 PDT
Go to https://libwebsockets.org/testserver/
Click "Send junk"

Chrome and Firefox don't terminate, Safari does.
Comment 1 Alexey Proskuryakov 2021-10-01 15:04:36 PDT
Comment 2 Alex Christensen 2021-10-01 16:59:34 PDT
When clicking the "Send junk" button it sends a text frame like 'aaaaaaaaaaaaaaaaa...'  and in SocketStreamHandleImpl::readStreamCallback I get kCFStreamEventEndEncountered.  The NSURLSession WebSocket implementation also terminates.
Comment 3 luryson 2022-01-20 03:13:04 PST
want to knows what happens from server side. can't reproduced
Comment 4 Lukas 2022-09-12 04:26:26 PDT
I can easily reproduce the behavior reported by Alex Christensen. Just go to https://libwebsockets.org/testserver/ and click "Send junk". This also has a real world implication as described here: