Skip to content

fix(eio): report oversized polling payloads - #5550

Open
wangxpych wants to merge 1 commit into
socketio:mainfrom
wangxpych:fix/report-max-buffer-size
Open

fix(eio): report oversized polling payloads#5550
wangxpych wants to merge 1 commit into
socketio:mainfrom
wangxpych:fix/report-max-buffer-size

Conversation

@wangxpych

Copy link
Copy Markdown

Summary

  • emit a transport error when an HTTP polling payload exceeds maxHttpBufferSize
  • preserve the existing HTTP 413 response
  • assert that server-side close handlers receive an actionable TransportError

Context

The polling transport returned HTTP 413 when the incoming body crossed the configured limit, but it did not notify the Engine.IO socket about the cause. As a result, server-side Socket.IO handlers only received transport close without a description.

The uWebSockets polling implementation already reports payload too large, and the WebSocket implementation reports the corresponding ws range error. This change brings the Node.js polling transport in line with those paths by using the existing transport error pipeline after the request has been cleaned up.

Fixes socketio/engine.io#706

Verification

  • npm run compile --workspace=engine.io
  • npm run format:check --workspace=engine.io
  • Engine.IO Node test suite: 175 passing, 2 pending
  • Engine.IO v3 compatibility suite: 175 passing, 2 pending
  • regression test fails before the fix with transport close and passes after the fix with transport error / payload too large

The aggregate npm test --workspace=engine.io command reaches 175 passing tests but the local WebTransport test times out because the optional @fails-components/webtransport-transport-http3-quiche native module is not built in this environment.

AI assistance disclosure: OpenAI Codex assisted with reproduction, implementation, and verification. The change was reviewed and tested against the repository's current main branch.

Emit the existing transport error after a polling request exceeds maxHttpBufferSize so server-side disconnect handlers receive an actionable description.

Assisted-by: OpenAI Codex:gpt-5

Signed-off-by: xuping.wang <2232455931@qq.com>
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.

maxHttpBufferSize violation silently disconnects client with no error event

1 participant