Skip to content

fix(eio): use Node 10-safe query parser on the uWS server - #5536

Open
FirmaSpring wants to merge 1 commit into
socketio:mainfrom
FirmaSpring:fix/eio-uws-fromentries
Open

fix(eio): use Node 10-safe query parser on the uWS server#5536
FirmaSpring wants to merge 1 commit into
socketio:mainfrom
FirmaSpring:fix/eio-uws-fromentries

Conversation

@FirmaSpring

Copy link
Copy Markdown

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behavior

engine.io still advertises engines.node: >=10.2.0. The HTTP server path was restored to a Node 10-compatible query parser in ae7fb46, but the uWebSockets server still parses the query string with Object.fromEntries(), which does not exist on Node 10/11.

A handshake on the uWS transport therefore throws before validation on the Node versions the package still claims to support.

New behavior

packages/engine.io/lib/userver.ts now uses the existing objectFromEntries helper, matching server.ts.

Other information (e.g. related issues)

Follow-up to #5527 / ae7fb46. The HTTP path is already fixed; this is the leftover uWS call site.

The HTTP server path was restored in ae7fb46, but userver still called Object.fromEntries.

Co-authored-by: FirmamentalSpring <287222957+FirmaSpring@users.noreply.github.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.

1 participant