Skip to content

Prevent clearing of client.request and client.response for XHR and JSONP polling#102

Closed
danielbeardsley wants to merge 1 commit intosocketio:masterfrom
danielbeardsley:master
Closed

Prevent clearing of client.request and client.response for XHR and JSONP polling#102
danielbeardsley wants to merge 1 commit intosocketio:masterfrom
danielbeardsley:master

Conversation

@danielbeardsley
Copy link

When listening to the client 'connect' message, clients using the XHR and JSONP polling protocols have no request or response attribute so I can't get access to the cookies. With both of these protocols, calling _write() calls onClose() and clears the requrst and response variables. I've just made a change that keeps these around until the next request, so request.headers.cookies is still available. Not sure if this is appropriate for the official repo, but it worked for me.

socket.on('connection', function(client){
  // client.request and client.response are both null
});

before client 'connected' event using long-polling
@rauchg
Copy link
Contributor

rauchg commented Dec 23, 2010

We'll expose normalized information directly through a public API (decoded cookies, extraHeaders, remoteAddress). This will apply to all clients from all transports. extraHeaders will contain stuff that is not available to all transports, but might be useful (eg: user-agent not available on websocket)

darrachequesne pushed a commit that referenced this pull request Jul 4, 2024
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
darrachequesne added a commit that referenced this pull request Jul 8, 2024
AMD and browser exports are useless here.
This pull request was closed.
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.

2 participants