From d3571c2acef1663e15a925b871b42f1bd2555378 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Fri, 17 Jul 2009 18:35:52 +0000 Subject: [PATCH] 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 --- lib/py/src/transport/TTwisted.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.17.1