From: Esteve Fernandez Date: Fri, 17 Jul 2009 18:35:52 +0000 (+0000) Subject: THRIFT-535. py: Twisted Thrift protocol max length is too small (fix off-by-one error... X-Git-Tag: 0.2.0~72 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=d3571c2acef1663e15a925b871b42f1bd2555378;p=common%2Fthrift.git THRIFT-535. py: Twisted Thrift protocol max length is too small (fix off-by-one error in MAX_LENGTH) git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@795187 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/py/src/transport/TTwisted.py b/lib/py/src/transport/TTwisted.py index 7b242324..a1ba1502 100644 --- a/lib/py/src/transport/TTwisted.py +++ b/lib/py/src/transport/TTwisted.py @@ -57,7 +57,7 @@ class TCallbackTransport(TMessageSenderTransport): class ThriftClientProtocol(basic.Int32StringReceiver): - MAX_LENGTH = 2 ** 31 + MAX_LENGTH = 2 ** 31 - 1 def __init__(self, client_class, iprot_factory, oprot_factory=None): self._client_class = client_class @@ -101,7 +101,7 @@ class ThriftClientProtocol(basic.Int32StringReceiver): class ThriftServerProtocol(basic.Int32StringReceiver): - MAX_LENGTH = 2 ** 31 + MAX_LENGTH = 2 ** 31 - 1 def dispatch(self, msg): self.sendString(msg)