From 9a65a0bb23ee5835eb84165163eed05c958cb8e7 Mon Sep 17 00:00:00 2001 From: Allan Saddi Date: Thu, 4 May 2006 01:49:04 +0000 Subject: Fix illusive problem with AJP implementation. --- ChangeLog | 6 ++++++ flup/server/ajp_base.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04867e3..8a56849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-03 Allan Saddi + + * Fix illusive problem with AJP implementation. Thanks to + Moshe Van der Sterre for explaining the problem and + providing a fix. + 2006-04-06 Allan Saddi * Catch a strange FieldStorage case. Seen in production. diff --git a/flup/server/ajp_base.py b/flup/server/ajp_base.py index d3145f4..6ffc2e6 100644 --- a/flup/server/ajp_base.py +++ b/flup/server/ajp_base.py @@ -466,7 +466,7 @@ class Request(object): with are: environ, input, startResponse(), and write(). """ # Do not ever change the following value. - _maxWrite = 8192 - 4 - 3 # 8k - pkt header - send body header + _maxWrite = 8192 - 4 - 3 - 1 # 8k - pkt header - send body header - NUL def __init__(self, conn): self._conn = conn @@ -588,7 +588,7 @@ class Request(object): pkt = Packet() pkt.data = PKTTYPE_SEND_BODY + \ struct.pack('>H', toWrite) + \ - data[:toWrite] + data[:toWrite] + '\x00' # Undocumented self._conn.writePacket(pkt) data = data[toWrite:] -- cgit v1.2.1