socketio / socketio/socket.io

Cleanup and unify access to request details

Open
#3,792 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

There are socket.request.headers, socket.conn.request.headers and socket.handshake.headers all referencing the same thing, so this is just a suggestion for a clearer interface around request data.

Socket.IO server version: 3.1.0

https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L126
https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L587-L589
https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L596-L598

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lib/socket.ts around lines 126, 587-589, and 596-598 to trace how the request details are exposed. Define the intended single access path and check the surrounding Socket.IO server behavior before deciding what compatibility and documentation updates would be needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.