CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 10:58:22 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/socketio/socket.io.git
etag: W/"a0d20f8f82e55ba311f7190317919c0e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=uWmz0hoE7LzGwYT5RqLBg84WUGdrCewxlyOUgKLMiUQKK%2B39IfBrdGnjSvtMXesKSlNQYHEbBXccjp%2B%2FYU6b9el7ytreitTOIhlaNWy%2F%2Bw1MMXrI5gMGBnBMTK9vxX2qyV8VEHAdpUlcC6KdrWDdFxSDstRMiDFHjEu5zuVgbQmMn%2FkQZPUHVX776FCXQqCjuY7j81AN5PVwdPYvrqRXnsX%2B3O7UaHKVBaY%2BYKW5%2B8rBBzOuFZXtVPDQVMvDo839%2B9WREzUVDKHC69qCOFbq3A%3D%3D--x350YtNw7VXo%2FQHQ--S1O2DV%2BTPFTIj06VJD3xHg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1817064541.1753268299; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 10:58:19 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 10:58:19 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BB70:3CF5A2:9D8166:BDB208:6880C04B
feat: remove the implicit connection to the default namespace · socketio/socket.io@09b6f23 · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit 09b6f23
committed
feat: remove the implicit connection to the default namespace
In previous versions, a client was always connected to the default
namespace, even if it requested access to another namespace.
This meant that the middlewares registered for the default namespace
were triggered in any case, which is a surprising behavior for end
users.
This also meant that the query option of the Socket on the client-side
was not sent in the Socket.IO CONNECT packet for the default namespace:
```js
// default namespace: query sent in the query params
const socket = io({
query: {
abc: "def"
}
});
// another namespace: query sent in the query params + the CONNECT packet
const socket = io("/admin", {
query: {
abc: "def"
}
});
```
The client will now send a CONNECT packet in any case, and the query
option of the Socket is renamed to "auth", in order to make a clear
distinction with the query option of the Manager (included in the query
parameters of the HTTP requests).
```js
// server-side
io.use((socket, next) => {
// not triggered anymore
});
io.of("/admin").use((socket, next => {
// triggered
console.log(socket.handshake.query.abc); // "def"
console.log(socket.handshake.auth.abc); // "123"
});
// client-side
const socket = io("/admin", {
query: {
abc: "def"
},
auth: {
abc: "123"
}
});
```1 parent 6f9ca62 commit 09b6f23Copy full SHA for 09b6f23
File tree
Expand file treeCollapse file tree
13 files changed
+85
-196
lines changedFilter options
- dist
- lib
- test
Expand file treeCollapse file tree
13 files changed
+85
-196
lines changed+5-6Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 | 14 |
| |
16 | 15 |
| |
17 | 16 |
| |
| |||
31 | 30 |
| |
32 | 31 |
| |
33 | 32 |
| |
34 |
| - | |
35 |
| - | |
| 33 | + | |
| 34 | + | |
36 | 35 |
| |
37 | 36 |
| |
38 |
| - | |
| 37 | + | |
39 | 38 |
| |
40 | 39 |
| |
41 | 40 |
| |
42 |
| - | |
43 |
| - | |
| 41 | + | |
| 42 | + | |
44 | 43 |
| |
45 | 44 |
| |
46 | 45 |
| |
|
+11-24Lines changed: 11 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 | 2 |
| |
6 | 3 |
| |
7 | 4 |
| |
8 |
| - | |
9 | 5 |
| |
10 | 6 |
| |
11 | 7 |
| |
| |||
19 | 15 |
| |
20 | 16 |
| |
21 | 17 |
| |
22 |
| - | |
23 | 18 |
| |
24 | 19 |
| |
25 | 20 |
| |
| |||
50 | 45 |
| |
51 | 46 |
| |
52 | 47 |
| |
53 |
| - | |
54 |
| - | |
| 48 | + | |
| 49 | + | |
55 | 50 |
| |
56 | 51 |
| |
57 |
| - | |
| 52 | + | |
58 | 53 |
| |
59 | 54 |
| |
60 |
| - | |
| 55 | + | |
61 | 56 |
| |
62 |
| - | |
| 57 | + | |
63 | 58 |
| |
64 | 59 |
| |
65 |
| - | |
| 60 | + | |
66 | 61 |
| |
67 | 62 |
| |
68 | 63 |
| |
| |||
77 | 72 |
| |
78 | 73 |
| |
79 | 74 |
| |
80 |
| - | |
81 |
| - | |
| 75 | + | |
| 76 | + | |
82 | 77 |
| |
83 |
| - | |
| 78 | + | |
84 | 79 |
| |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
| 80 | + | |
90 | 81 |
| |
91 | 82 |
| |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 | 83 |
| |
97 | 84 |
| |
98 | 85 |
| |
| |||
182 | 169 |
| |
183 | 170 |
| |
184 | 171 |
| |
185 |
| - | |
| 172 | + | |
186 | 173 |
| |
187 | 174 |
| |
188 | 175 |
| |
|
+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
| 152 | + | |
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
| 157 | + | |
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
|
+4-14Lines changed: 4 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
43 | 42 |
| |
44 | 43 |
| |
45 | 44 |
| |
| |||
131 | 130 |
| |
132 | 131 |
| |
133 | 132 |
| |
134 |
| - | |
| 133 | + | |
135 | 134 |
| |
136 | 135 |
| |
137 | 136 |
| |
138 | 137 |
| |
139 |
| - | |
| 138 | + | |
140 | 139 |
| |
141 | 140 |
| |
142 | 141 |
| |
| |||
145 | 144 |
| |
146 | 145 |
| |
147 | 146 |
| |
148 |
| - | |
| 147 | + | |
149 | 148 |
| |
150 | 149 |
| |
151 | 150 |
| |
| |||
221 | 220 |
| |
222 | 221 |
| |
223 | 222 |
| |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 | 223 |
| |
233 | 224 |
| |
234 | 225 |
| |
| |||
346 | 337 |
| |
347 | 338 |
| |
348 | 339 |
| |
349 |
| - | |
350 |
| - | |
| 340 | + | |
351 | 341 |
| |
352 | 342 |
| |
353 | 343 |
| |
|
-4Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 | 61 |
| |
66 | 62 |
| |
67 | 63 |
| |
|
+6-2Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 |
| |
43 | 47 |
| |
44 | 48 |
| |
| |||
58 | 62 |
| |
59 | 63 |
| |
60 | 64 |
| |
61 |
| - | |
| 65 | + | |
62 | 66 |
| |
63 | 67 |
| |
64 |
| - | |
| 68 | + | |
65 | 69 |
| |
66 | 70 |
| |
67 | 71 |
| |
|
+7-18Lines changed: 7 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
| 46 | + | |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
| 51 | + | |
58 | 52 |
| |
59 | 53 |
| |
60 | 54 |
| |
| |||
64 | 58 |
| |
65 | 59 |
| |
66 | 60 |
| |
67 |
| - | |
| 61 | + | |
| 62 | + | |
68 | 63 |
| |
69 | 64 |
| |
70 | 65 |
| |
| |||
211 | 206 |
| |
212 | 207 |
| |
213 | 208 |
| |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
| 209 | + | |
221 | 210 |
| |
222 | 211 |
| |
223 | 212 |
| |
|
+13-28Lines changed: 13 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
| 1 | + | |
3 | 2 |
| |
4 | 3 |
| |
5 | 4 |
| |
| |||
18 | 17 |
| |
19 | 18 |
| |
20 | 19 |
| |
21 |
| - | |
22 | 20 |
| |
23 | 21 |
| |
24 | 22 |
| |
| |||
62 | 60 |
| |
63 | 61 |
| |
64 | 62 |
| |
65 |
| - | |
66 |
| - | |
| 63 | + | |
| 64 | + | |
67 | 65 |
| |
68 | 66 |
| |
69 |
| - | |
| 67 | + | |
70 | 68 |
| |
71 | 69 |
| |
72 |
| - | |
| 70 | + | |
73 | 71 |
| |
74 | 72 |
| |
75 |
| - | |
| 73 | + | |
76 | 74 |
| |
77 | 75 |
| |
78 |
| - | |
| 76 | + | |
79 | 77 |
| |
80 | 78 |
| |
81 | 79 |
| |
| |||
90 | 88 |
| |
91 | 89 |
| |
92 | 90 |
| |
93 |
| - | |
94 |
| - | |
| 91 | + | |
| 92 | + | |
95 | 93 |
| |
96 |
| - | |
| 94 | + | |
97 | 95 |
| |
98 | 96 |
| |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
| 97 | + | |
105 | 98 |
| |
106 | 99 |
| |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 | 100 |
| |
113 | 101 |
| |
114 | 102 |
| |
| |||
199 | 187 |
| |
200 | 188 |
| |
201 | 189 |
| |
202 |
| - | |
| 190 | + | |
203 | 191 |
| |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
| 192 | + | |
208 | 193 |
| |
209 | 194 |
| |
210 | 195 |
| |
|
You can’t perform that action at this time.
0 commit comments