File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ to a single process.
239
239
- ` allowUpgrades ` (` Boolean ` ): whether to allow transport upgrades
240
240
(` true ` )
241
241
- ` perMessageDeflate ` (` Object|Boolean ` ): parameters of the WebSocket permessage-deflate extension
242
- (see [ ws module] ( https://github.com/einaros/ws ) api docs). Set to ` false ` to disable . (` true ` )
242
+ (see [ ws module] ( https://github.com/einaros/ws ) api docs). Set to ` true ` to enable . (` false ` )
243
243
- ` threshold ` (` Number ` ): data is compressed only if the byte size is above this value (` 1024 ` )
244
244
- ` httpCompression ` (` Object|Boolean ` ): parameters of the http compression for the polling transports
245
245
(see [ zlib] ( http://nodejs.org/api/zlib.html#zlib_options ) api docs). Set to ` false ` to disable. (` true ` )
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function Server (opts) {
47
47
this . cookie = false !== opts . cookie ? ( opts . cookie || 'io' ) : false ;
48
48
this . cookiePath = false !== opts . cookiePath ? ( opts . cookiePath || '/' ) : false ;
49
49
this . cookieHttpOnly = false !== opts . cookieHttpOnly ;
50
- this . perMessageDeflate = false !== opts . perMessageDeflate ? ( opts . perMessageDeflate || true ) : false ;
50
+ this . perMessageDeflate = opts . perMessageDeflate || false ;
51
51
this . httpCompression = false !== opts . httpCompression ? ( opts . httpCompression || { } ) : false ;
52
52
this . initialPacket = opts . initialPacket ;
53
53
Original file line number Diff line number Diff line change @@ -2503,7 +2503,7 @@ describe('server', function () {
2503
2503
} ) ;
2504
2504
2505
2505
it ( 'should not compress when the byte size is below threshold' , function ( done ) {
2506
- var engine = listen ( { transports : [ 'websocket' ] } , function ( port ) {
2506
+ var engine = listen ( { transports : [ 'websocket' ] , perMessageDeflate : true } , function ( port ) {
2507
2507
engine . on ( 'connection' , function ( conn ) {
2508
2508
var socket = conn . transport . socket ;
2509
2509
var send = socket . send ;
You can’t perform that action at this time.
0 commit comments