THRIFT-535. py: Twisted Thrift protocol max length is too small
authorEsteve Fernandez <esteve@apache.org>
Fri, 17 Jul 2009 18:18:19 +0000 (18:18 +0000)
committerEsteve Fernandez <esteve@apache.org>
Fri, 17 Jul 2009 18:18:19 +0000 (18:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@795176 13f79535-47bb-0310-9956-ffa450edef68

lib/py/src/transport/TTwisted.py

index b5c2147..7b24232 100644 (file)
@@ -57,6 +57,8 @@ class TCallbackTransport(TMessageSenderTransport):
 
 class ThriftClientProtocol(basic.Int32StringReceiver):
 
+    MAX_LENGTH = 2 ** 31
+
     def __init__(self, client_class, iprot_factory, oprot_factory=None):
         self._client_class = client_class
         self._iprot_factory = iprot_factory
@@ -99,6 +101,8 @@ class ThriftClientProtocol(basic.Int32StringReceiver):
 
 class ThriftServerProtocol(basic.Int32StringReceiver):
 
+    MAX_LENGTH = 2 ** 31
+
     def dispatch(self, msg):
         self.sendString(msg)