Skip to content

fix(ws): warn when the server ignores binary frames - #166

Merged
frostming merged 1 commit into
mainfrom
fix/ws-warn-binary-frames
Oct 12, 2026
Merged

frostming merged 1 commit into
mainfrom
fix/ws-warn-binary-frames

Conversation

@frostming

Copy link
Copy Markdown
Contributor

Summary

The WebSocket server transport drops binary frames without saying anything. A client that sends JSON-RPC as binary frames just sees initialize hang, with nothing to explain why (#162).

Binary frames are still ignored, as the transport RFD requires ("All messages are WebSocket text frames containing JSON-RPC. Binary frames are ignored."). The server now logs a warning on the first binary frame of each connection. docs/web-transport.md now also says that it is one message per text frame and that binary frames are ignored.

Refs #162

Testing

  • New test_asgi_websocket_warns_once_on_binary_frames: two binary frames produce exactly one warning, and initialize still gets answered. It fails without the source change.
  • make check: passed.
  • make test: 403 passed, 1 skipped (opt-in Gemini test).
  • make docs-test: passed.

🤖 Generated with Claude Code

The WebSocket server silently dropped binary frames, so a client that
sends JSON-RPC as binary saw initialize hang with no diagnostic. Keep
ignoring them per the transport RFD, but log a warning once per
connection.

Refs #162

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frostming
frostming merged commit 450fab5 into main Oct 12, 2026
8 checks passed
@frostming
frostming deleted the fix/ws-warn-binary-frames branch October 12, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant