freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

fix: increase WebSocket max message size to 100MB

Open sanity opened this issue 5 months ago • 0 comments

Summary

  • Increased WebSocket max message size from default (~64KB) to 100MB
  • Fixes issue where PUT requests with large WASM contracts were silently dropped
  • Resolves River invitation bug where room creation was failing

Problem

The default WebSocket message size limit was too small for WASM contracts which can be several hundred KB (River's room contract is 360KB). This caused PUT requests to be silently dropped at the WebSocket protocol level before reaching Freenet's handler.

Solution

Added max_message_size(100 * 1024 * 1024) configuration to the WebSocket upgrade handler.

Testing

  • River PUT operations now work correctly
  • Large contract deployments no longer fail silently
  • Backwards compatible with existing clients

Related Issues

  • Fixes #1676 (WebSocket GET operations hang when contract not found)
  • Resolves River invitation hanging issue

🤖 Generated with Claude Code

sanity avatar Jun 19 '25 01:06 sanity