Navigation Menu

Skip to content

Commit

Permalink
Add parameter compression_options=None.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasrosdal committed Mar 8, 2017
1 parent e249267 commit 5931f54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tornado/websocket.py
Expand Up @@ -520,7 +520,7 @@ def compress(self, data):


class _PerMessageDeflateDecompressor(object):
def __init__(self, persistent, max_wbits):
def __init__(self, persistent, max_wbits, compression_options=None):
if max_wbits is None:
max_wbits = zlib.MAX_WBITS
if not (8 <= max_wbits <= zlib.MAX_WBITS):
Expand Down Expand Up @@ -716,7 +716,7 @@ def _create_compressors(self, side, agreed_parameters, compression_options=None)
self._compressor = _PerMessageDeflateCompressor(
**self._get_compressor_options(side, agreed_parameters, compression_options))
self._decompressor = _PerMessageDeflateDecompressor(
**self._get_compressor_options(other_side, agreed_parameters))
**self._get_compressor_options(other_side, agreed_parameters, compression_options))

def _write_frame(self, fin, opcode, data, flags=0):
if fin:
Expand Down

0 comments on commit 5931f54

Please sign in to comment.