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 7b24232..a1ba150 100644
--- a/lib/py/src/transport/TTwisted.py
+++ b/lib/py/src/transport/TTwisted.py
@@ -57,7 +57,7 @@
 
 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 ThriftServerProtocol(basic.Int32StringReceiver):
 
-    MAX_LENGTH = 2 ** 31
+    MAX_LENGTH = 2 ** 31 - 1
 
     def dispatch(self, msg):
         self.sendString(msg)