This commit is contained in:
Tobias Oberstein 2017-03-23 10:25:04 +01:00
parent bc3c292d4f
commit c00958d268
3 changed files with 4 additions and 4 deletions

View File

@ -576,8 +576,8 @@ class PerMessageDeflate(PerMessageCompress, PerMessageDeflateMixin):
pmce = cls(is_server,
accept.no_context_takeover if accept.no_context_takeover is not None else accept.offer.request_no_context_takeover,
accept.request_no_context_takeover,
accept.window_bits if accept.window_bits is not None else accept.offer.requestMaxWindowBits,
accept.requestMaxWindowBits,
accept.window_bits if accept.window_bits is not None else accept.offer.request_max_window_bits,
accept.request_max_window_bits,
accept.mem_level)
return pmce

View File

@ -75,7 +75,7 @@ if __name__ == '__main__':
offers1 = [PerMessageDeflateOffer(acceptNoContextTakeover=True,
acceptMaxWindowBits=True,
requestNoContextTakeover=False,
requestMaxWindowBits=0)]
request_max_window_bits=0)]
# request the server to use a sliding window of 2^8 bytes
offers2 = [PerMessageDeflateOffer(True, True, False, 8)]

View File

@ -101,7 +101,7 @@ if __name__ == '__main__':
for offer in offers:
if isinstance(offer, PerMessageDeflateOffer):
if offer.acceptMaxWindowBits:
return PerMessageDeflateOfferAccept(offer, requestMaxWindowBits=8)
return PerMessageDeflateOfferAccept(offer, request_max_window_bits=8)
# factory.setProtocolOptions(perMessageCompressionAccept = accept0)