Damien Arrachequesne
ac945d1eba
[feat] Add support for dynamic namespaces ( #3195 )
...
This follows #3187 , with a slightly different API.
A dynamic namespace can be created with:
```js
io.of(/^\/dynamic-\d+$/).on('connect', (socket) => { /* ... */ });
```
2018-03-29 23:08:08 +02:00
Damien Arrachequesne
1f1d64bab6
[fix] Include the protocol in the origins check ( #3198 )
...
Previously, the protocol was not taken in account, which caused the following behaviour:
```js
io.origins('https://foo.example.com:443 '); // ok as a string
io.origins(['https://foo.example.com:443 '); // not ok as an array
```
Fixes #3190
2018-03-10 08:56:42 +01:00
Damien Arrachequesne
f4fc517e0f
[fix] Properly emit 'connect' when using a custom namespace ( #3197 )
...
When using a custom namespace with a middleware, the client did not receive the 'connect' event.
Fixes #3082
2018-03-10 08:51:22 +01:00
Damien Arrachequesne
c0c79f019e
[feat] Add support for dynamic namespaces ( #3187 )
2018-03-01 00:22:16 +01:00
Thiago Santos
f333479080
[test] Use npm scripts instead of gulp ( #3078 )
2017-10-16 07:46:42 +02:00
Damien Arrachequesne
1f0e64a6da
[fix] Do not throw when receiving an unhandled error packet ( #3038 )
2017-08-26 07:35:57 +02:00
Damien Arrachequesne
94df7bcdfd
[fix] Fix middleware initialization ( #2969 )
...
Fix "TypeError: Cannot convert undefined or null to object" when a
middleware is added before the engine is properly attached.
2017-06-12 14:00:48 +02:00
Damien Arrachequesne
2b216902e1
[fix] Fix timing issues with middleware ( #2948 )
...
Using a middleware could previously lead to a connecting client
receiving a connect event from the server before the server triggers
its own connect event.
2017-05-22 13:01:59 +02:00
Damien Arrachequesne
87b06ad362
[feat] Move binary detection to the parser ( #2923 )
2017-04-25 00:38:07 +02:00
Damien Arrachequesne
01a4623613
[feat] Allow to join several rooms at once ( #2879 )
2017-02-26 09:15:32 +01:00
Damien Arrachequesne
54ff591b07
[feature] Merge Engine.IO and Socket.IO handshake packets ( #2833 )
2017-02-01 15:28:14 +01:00
Damien Arrachequesne
3d695c60f1
[chore] Bump engine.io to version 2.0.0 ( #2832 )
2017-01-23 23:16:51 +01:00
Tom Atkinson
2258a6a6e3
[fix] Properly close the connection on error ( #2681 )
2017-01-16 08:29:11 +01:00
Serhii Sol
1e31769062
[fix] Fixes socket.use error packet ( #2772 )
...
* fix(socket): Fixes socket.use error packet which drops nodejs due to nuances of Nodejs' EventEmitter
* fix(socket): Fixes missing error event on socket
* fix(socket): test fix, should listen for clientSocket instead of server socket
* minor update
2016-12-01 02:25:13 +01:00
Alex
5a123beea5
[feature] Add support for socket middleware ( #2306 )
2016-11-05 01:51:29 +01:00
Jamie Davis
6f44f3a8ef
[test] Fix leaking clientSocket ( #2721 )
...
Test 'should be able to close sio sending a port' defined a clientSocket
but didn't set 'reconnection: false'.
Now, the default behavior of a clientSocket is 'reconnection: true'.
As a result, the clientSocket was "leaked" from the test case
and seemed to intermittently connect to the servers in subsequent
test cases. This would cause other tests to timeout unexpectedly.
It's not clear to me why this would happen, since the test case
assigns a unique port number to the socket.
However, if you go into socket.io-client and assign and log
unique IDs to each socket, then you'll see that this clientSocket
shows up in other test cases if the reconnectionDelay strikes
unluckily.
2016-11-05 01:06:04 +01:00
Kenton Varda
d026c00d05
[fix] Make ETag header comply with standard. ( #2603 )
...
The standard says that an ETag must be surrounded in double quotes:
https://tools.ietf.org/html/rfc7232#section-2.3
Although browsers tend to be lenient, omitting the quotes can confuse/break some kinds of proxies and other tools that demand compliant formatting. For example, Sandstorm.io enforces strict HTTP usage for security reasons and will block responses with invalid ETags.
2016-10-30 14:19:00 +01:00
Damien Arrachequesne
c20e0b26c9
[chore] Bump engine.io to 1.7.2 ( #2729 )
2016-10-24 03:21:11 +02:00
bananaapple
5c10c5439b
[test] Use client function to unify client in test script ( #2731 )
2016-10-24 02:35:01 +02:00
Damien Arrachequesne
43d9a4b55d
[feature] Add a 'disconnecting' event to access to socket.rooms upon disconnection ( #2332 )
2016-10-06 23:23:26 +02:00
Naoyuki Kanezawa
881f16553c
Merge pull request #2508 from tw0517tw/quote-exec
...
add quote to exec paths, prevent error when spaces in path
2016-04-12 03:57:43 +09:00
Guillermo Rauch
fb0253edea
Merge pull request #2422 from nus-fboa2016-si/queryStringFix
...
Fix for Issue #331 on socket.io-client
2016-04-11 08:44:59 -07:00
tw0517tw
3c5f5a0864
use a bigger timeout for slower machine
2016-04-11 22:31:47 +08:00
tw0517tw
a23d26a617
add quote to exec paths, prevent error when spaces in path
2016-04-11 22:21:34 +08:00
Zhu Liang
6edcd1c6ba
styling fixes
2016-03-31 12:55:42 +08:00
Zhu Liang
6b2394e612
disable loading lib by default to avoid syntax error due to lib containing new es6 syntax
2016-03-31 03:54:32 +08:00
Zhu Liang
677af3fa11
changed env var name, added testing documentation to readme
2016-03-21 13:11:03 +08:00
Zhu Liang
de5b588e17
explicit distinction between current and compat in test so we can serve either compat or current as default
2016-03-19 20:13:57 +08:00
Zhu Liang
5a20c1195b
set env vars in travis
2016-03-19 19:49:41 +08:00
Zhu Liang
88161539a1
implement compat test using env variable
2016-03-17 13:42:29 +08:00
Zhu Liang
d99d4d15ae
add compat test for babel-transformed codes
2016-03-17 13:11:20 +08:00
Zheng Weihan
1293505dc2
update tests.
2016-02-14 13:48:28 +08:00
Zheng Weihan
045674de97
remove unnecessary decoder. url.parse already decodes string.
...
add test to test decoding function.
2016-02-14 13:46:26 +08:00
Zheng Weihan
13af610f6d
add test for issue #331 on socket.io-client.
2016-01-31 15:44:39 +08:00
nkzawa
a75f46f06f
add a test for graceful shutdown
2016-01-21 20:50:44 +09:00
Guillermo Rauch
c348737fe6
socket.io: increase large binary data test timeout
2015-11-28 15:13:13 -08:00
Damien Arrachequesne
1dfacc6647
Trigger callback even when joining an already joined room
2015-11-27 22:08:18 +01:00
Guillermo Rauch
c504315982
Merge pull request #2322 from darrachequesne/issue-2199-clean
...
Add hasOwnProperty checks
2015-11-23 09:19:35 -08:00
Damien Arrachequesne
09f446eca0
Add hasOwnProperty checks
2015-11-23 15:12:21 +01:00
Guillermo Rauch
8683206e31
Merge pull request #2239 from darrachequesne/issue-2199
...
converted arrays to objects
2015-11-22 10:34:57 -08:00
Guillermo Rauch
988d9d2346
Merge pull request #1999 from nkzawa/patch-3
...
Fix a few assertions are not executed properly
2015-11-22 10:17:02 -08:00
Damien Arrachequesne
b73d9bea4e
converted arrays to objects
2015-11-22 11:12:40 +01:00
Damien Arrachequesne
bf5897cedc
Fixed tests with large data
2015-11-20 22:01:16 +01:00
Guillermo Rauch
b1775b1cb8
Merge pull request #2051 from tobalsgithub/master
...
Allowing a custom function for opts.allowRequest
2015-11-16 13:15:08 -08:00
Guillermo Rauch
e41483be9e
Merge branch '1.3.6-patch'
2015-07-14 20:04:44 -07:00
Guillermo Rauch
c79e787671
test: better timeout for stress test
2015-07-14 19:58:42 -07:00
Guillermo Rauch
91c7bde34b
Merge commit '342faf219793fc5c1f130fc33e3fb5422dab516d'
2015-05-27 22:55:15 -07:00
TC
1dde0f3947
Allowing a custom function for opts.allowRequest
2015-03-12 15:50:31 -06:00
Guillermo Rauch
12c6ee132d
improve test
2015-03-03 10:34:56 -08:00
Guillermo Rauch
125ab51338
test: added test for parser breakage
2015-03-03 10:08:26 -08:00