File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 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.
239239 - ` allowUpgrades ` (` Boolean ` ): whether to allow transport upgrades
240240 (` true ` )
241241 - ` 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 ` )
243243 - ` threshold ` (` Number ` ): data is compressed only if the byte size is above this value (` 1024 ` )
244244 - ` httpCompression ` (` Object|Boolean ` ): parameters of the http compression for the polling transports
245245 (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) {
4747 this . cookie = false !== opts . cookie ? ( opts . cookie || 'io' ) : false ;
4848 this . cookiePath = false !== opts . cookiePath ? ( opts . cookiePath || '/' ) : false ;
4949 this . cookieHttpOnly = false !== opts . cookieHttpOnly ;
50- this . perMessageDeflate = false !== opts . perMessageDeflate ? ( opts . perMessageDeflate || true ) : false ;
50+ this . perMessageDeflate = opts . perMessageDeflate || false ;
5151 this . httpCompression = false !== opts . httpCompression ? ( opts . httpCompression || { } ) : false ;
5252 this . initialPacket = opts . initialPacket ;
5353
Original file line number Diff line number Diff line change @@ -2503,7 +2503,7 @@ describe('server', function () {
25032503 } ) ;
25042504
25052505 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 ) {
25072507 engine . on ( 'connection' , function ( conn ) {
25082508 var socket = conn . transport . socket ;
25092509 var send = socket . send ;
You can’t perform that action at this time.
0 commit comments