Damien Arrachequesne
be3833bddd
[refactor] Use Buffer.concat([]) to construct an empty buffer ( #555 )
2018-02-27 22:03:31 +01:00
Damien Arrachequesne
65b1ad1b8a
[chore] Update default values for pingTimeout ( #551 )
...
`pingTimeout` now defaults to 5 seconds instead of 60 seconds.
2018-02-27 22:03:16 +01:00
Damien Arrachequesne
b1fa020675
[chore] Revert to ws as default wsEngine ( #550 )
...
Related:
- https://github.com/socketio/socket.io/issues/2956
- https://github.com/socketio/socket.io/issues/3100
Fixes #536
Fixes #516
Fixes #474
2017-12-29 22:39:34 +01:00
Nick Tazelaar
73e579a501
[refactor] Add some checks to prevent usage of undefined properties ( #540 )
2017-11-22 22:04:54 +01:00
efkan
2abb217e26
[feat] Make generateId method async ( #535 )
...
That change will allow to retrieve the client id asynchronously, from a database for example.
2017-10-20 08:00:29 +02:00
Damien Arrachequesne
49362abcd0
[fix] Fix undefined remoteAddress when using uws ( #533 )
...
Fixes https://github.com/socketio/socket.io/issues/2982
2017-10-11 07:29:52 +02:00
Damien Arrachequesne
e0d720c7f7
[fix] Check whether 'Origin' header has invalid characters ( #531 )
...
Since the 'Origin' header is used as response header, a value with invalid characters would trigger
'The header content contains invalid characters' errors.
Closes #517
2017-09-02 14:16:14 +02:00
Mark Bjerke
38d639a5d0
[fix] Use explicit require of wsEngine ( #523 )
...
Because WebPack does not support variables in require statements.
Closes #522
2017-09-02 14:12:26 +02:00
Damien Arrachequesne
fd20b91208
[test] Use npm scripts instead of gulp ( #530 )
2017-09-01 14:21:57 +02:00
Raúl Montes
7f63d38b2a
[fix] Fix undeterministic error in polling buffer processing ( #529 )
...
Ensure all assignments for chunks are Buffer when they should, even when onData is supposed to not
be called again.
2017-09-01 13:03:48 +02:00
Harutyun Amirjanyan
3dcc2d5cbd
[fix] Use workaround for setEncoding bug in node 0.10+ ( #527 )
...
The server often crashes with 'TypeError: "list" argument must be an Array of Buffers' errors,
which is caused by a bug in new versions of node, where setEncoding call does not work for messages
that are already in the queue.
This pull request makes sure that concat is never called in the non binary case, even if
setEncoding does not work properly.
2017-08-31 22:49:18 +02:00
Damien Arrachequesne
e76e035873
[fix] Fix null payload when aborting connection ( #503 )
2017-04-28 13:46:50 +02:00
Damien Arrachequesne
81ef0bc939
[feat] Add an option to toggle handling of OPTIONS requests ( #491 )
...
By setting `handlePreflightRequest` to false, OPTIONS request are no
longer processed by engine.io. A function can also be provided.
2017-03-11 09:04:00 +01:00
Luigi Pinca
cdb487dbdc
[fix] Initialize the WebSocket server in the Server constructor ( #476 )
2017-01-30 15:52:00 +01:00
Damien Arrachequesne
274efa120e
[feature] Add an initialPacket option ( #471 )
2017-01-22 07:51:27 +01:00
Konstantin Zolotarev
a3496ed6eb
[fix] Discard packets when socket is closed ( #469 )
2017-01-05 21:01:37 +01:00
Matt90o
57ec952ff7
[docs] Fix spelling mistake ( #466 )
...
Edited a minor spelling mistake. 'Comparesses' -> 'Compresses'
2017-01-04 06:39:47 +01:00
Damien Arrachequesne
f72f6f3fa6
[fix] allowRequest failures now return 403 Forbidden ( #452 )
2016-12-22 08:41:51 +01:00
Jérémy Lal
7e50871c41
[chore] Use uws as default wsEngine, and ws as fallback ( #459 )
2016-12-12 22:02:03 +01:00
Damien Arrachequesne
79955091f5
[fix] Add proper response when handleUpgrade fails ( #458 )
...
When the `verify` method fails, the current implementation closes the
connection immediately, which is understood by some proxy (such as
nginx) as if the server was not available (resulting in "upstream
prematurely closed connection while reading response header from
upstream" error). That commit make sure a proper response is sent
before closing the connection.
2016-12-10 22:01:18 +01:00
Damien Arrachequesne
b5292c7826
[refactor] Remove deprecated code used for nodejs v0.8 ( #456 )
2016-12-08 01:01:10 +01:00
Gatsbill
01c6a12de5
[perf] websocket optimisation ( #453 )
2016-12-05 23:59:24 +01:00
Dominik Paľo
8450d03f06
[docs] Rename ServerRequest to IncomingMessage ( #448 )
...
`http.ServerRequest` did refer to the HTTP API of Nodejs prior to v0.10
2016-12-05 23:28:01 +01:00
Damien Arrachequesne
cd2ff466fc
[fix] Only add defined callbacks to the stack ( #447 )
...
Before that commit, undefined callbacks were also added to the array,
which could lead to 'Maximum call stack size exceeded' error when
flush() method was called.
Fixes #399
2016-11-21 22:41:47 +01:00
Julian Grinblat
7f659a50d3
[fix] Don't delete ws when closing the server ( #444 )
2016-11-15 22:01:20 +01:00
dlimkin
60780e2fb7
[feature] Fix cookiePath empty bug and add cookieHttpOnly option ( #423 )
2016-11-03 01:29:40 +01:00
Diga Widyaprana
7cbdd5e5d9
[style] Add ESlint ( #385 )
2016-10-31 02:40:58 +01:00
Kim Min-Ho
e008ffeba5
[style] Fix some typos ( #439 )
2016-10-25 00:58:01 +02:00
Jérémy Lal
724b3fd8e0
[fix] Close and free webSocketServer ( #393 )
2016-10-20 15:53:01 +02:00
Atanas Palavrov
9bd84818fa
Restoring require('ws') as separate expression for browserify.
2016-08-05 00:38:20 +02:00
Guillermo Rauch
1529d5acbe
1.6.10
2016-06-23 17:30:47 -07:00
Guillermo Rauch
17ec2150c0
server: implement maxHttpBufferSize for ws
2016-06-23 17:15:46 -07:00
Jérémy Lal
aa1ee6ffab
wsEngine option and env var, defaults to 'ws'
2016-05-07 00:02:01 +02:00
nkzawa
941a6ebf52
discard transport on server close
2016-01-21 20:02:54 +09:00
Luigi Pinca
cd97c7f412
polling: don't set the closeTimeoutTimer if the transport is upgraded
2016-01-17 20:19:03 +01:00
Guillermo Rauch
391ce0dc8b
server: catch websocket errors before upgrade
2015-12-28 16:07:42 -03:00
Guillermo Rauch
e77118af61
Revert "server: use yeast to generate the socket id"
2015-12-03 11:46:38 -08:00
Luigi Pinca
08e8d67fe6
server: use yeast to generate the socket id
2015-12-03 19:29:18 +01:00
Luigi Pinca
daeddf1f83
server: remove unused dependencies and fix indentation
2015-12-03 19:23:27 +01:00
Guillermo Rauch
98d9fe3f59
fix tests on node 0.8
2015-12-01 11:35:54 -08:00
nkzawa
78b287742d
improve X-XSS-Protection header definition
2015-12-01 23:03:44 +09:00
nkzawa
1472a79884
remove the compress option from control packets
2015-12-01 14:28:33 +09:00
nkzawa
b56603169a
add threshold for permessage-deflate
2015-12-01 14:21:53 +09:00
nkzawa
5092c4fc95
don't compress control packets
2015-11-29 23:27:08 +09:00
Damien Arrachequesne
cf9b0298a1
Add hasOwnProperty checks
2015-11-23 15:13:19 +01:00
Guillermo Rauch
057f32d195
Merge pull request #318 from amiuhle/cookie-path
...
Cookie path
2015-11-21 10:47:26 -08:00
Guillermo Rauch
b79830edd7
Merge pull request #348 from nkzawa/patch-7
...
Fix polling transports and add tests for closing transports
2015-11-18 10:41:15 -08:00
Guillermo Rauch
8163660cda
Merge pull request #338 from nkzawa/patch-2
...
Call res.end() when polling error
2015-11-18 10:40:50 -08:00
Naoyuki Kanezawa
6a85f8e31a
Merge pull request #353 from DavidCai1993/patch-1
...
Fix a small typo
2015-11-18 23:23:14 +09:00
Guillermo Rauch
fb811bf200
Merge pull request #305 from lbdremy/fix/set-encoding-before-listening-on-data
...
Set encoding of the request to utf8 before listening on data events
2015-11-16 13:27:28 -08:00