Commit Graph

84 Commits

Author SHA1 Message Date
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
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
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
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
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
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
b56603169a add threshold for permessage-deflate 2015-12-01 14:21:53 +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
nkzawa
deb7ae40a4 fix sockets can stay open when upgrade failed 2015-08-29 03:48:05 +09:00
zensh
df4331dd1a support custom socket id 2015-05-08 10:24:32 +08:00
Timo Uhlmann
0c28be9ba5 Test & doc for cookiePath 2015-04-03 15:05:56 +02:00
Timo Uhlmann
d227719cf9 Allow overriding the cookiePath 2015-04-03 14:50:29 +02:00
Naoyuki Kanezawa
d11e17c8d7 support compression 2015-01-06 02:11:39 +09:00
Guillermo Rauch
681b4fc27b server: ref fix by @nicokaiser 2014-07-30 01:42:01 -07:00
Guillermo Rauch
01e173c8d5 server: fix ws memory leak (fixes #268) 2014-07-29 17:35:32 -07:00
Guillermo Rauch
2ec3d89d4b Merge pull request #213 from defunctzombie/server_attach
add Server.attach method
2014-06-04 11:16:57 -07:00
Roman Shtylman
48f006f947 make require('engine.io')() return a new Server instance
fixes #212
2014-06-04 13:45:48 -04:00
Roman Shtylman
d74f93e4f9 add Server.attach method
This method does what engine.attach use to do but is now on the
instantiated server instance. This makes it possible to create engine.io
servers without yet attaching them to any active http server.

When creating a project which will server static files/pages alongside
engine.io on the same domain/process this makes it easier to separate
logic into files without having to pass around the http server.
2014-06-04 13:45:43 -04:00
Mark Mokryn
b98406a678 fix GH-211, set CORS headers when sending error message 2014-06-04 03:21:11 +03:00
Guillermo Rauch
10261c5211 removed flashsocket, moving to userland 2014-05-17 15:24:40 -07:00
Tony Kovanen
802f130080 Made the request verification process async 2014-04-11 01:17:57 +03:00
Tony Kovanen
db36d031bc Added support for giving a function to engine.io to decide whether a request should be allowed or not when verifying. This is used by socket.io to check for allowed origins. 2014-04-11 01:11:32 +03:00
Contra
1ebc286af4 use _query instead of query, fixes compat with restify 2014-04-03 18:03:16 -07:00
Tony Kovanen
f8100f9237 Added a maximum buffer size to received data from polling. Settable with the maxHttpBufferSize option 2014-03-26 21:19:54 +02:00
Julian Salazar
ef77af8c2f close() properly when triggered in connection handler 2014-02-20 01:06:41 -08:00
Guillermo Rauch
ab4ea948cc Merge pull request #218 from rase-/add/binary-support
Binary support
2014-02-18 17:28:57 -08:00
Tony Kovanen
20d06700c3 Removed the need to set any default values for binary support in transports 2014-02-18 23:56:01 +02:00
Tony Kovanen
a9a6f25e76 style 2014-02-18 23:33:22 +02:00
Tony Kovanen
8cd37f0839 Style 2014-02-15 09:15:12 +02:00
Nick LaGrow
468ca23339 Merge branch 'master' of https://github.com/LearnBoost/engine.io into upgrade 2014-02-08 12:11:35 -08:00
Nick LaGrow
17143bde09 Deny upgrade when proxy doesn't support websocket
Some proxies - such as nginx and squid - don't support websocket. The client attempting to upgrade its transport caused the engine.io connection to break (see GH-177). THe server now checks within handleRequest to see if the transport has changed without an upgrade request - if this is the case, the upgrade request is denied (defaults to polling) and the connection is maintained
2014-02-08 12:10:47 -08:00
Mark Mokryn
3b8d7863b8 Socket.request made a nonwritable Socket property set in constructor 2014-02-03 13:32:59 +02:00
Tony Kovanen
44159592c7 Using url parameter for communicating the need for base64 instead of upgrade packet for WebSockets 2014-02-03 02:31:48 +02:00
Tony Kovanen
dbe140c117 Binary support 2014-02-01 01:20:51 +02:00