diff options
author | Allan Saddi <allan@saddi.com> | 2006-05-04 01:49:04 +0000 |
---|---|---|
committer | Allan Saddi <allan@saddi.com> | 2006-05-04 01:49:04 +0000 |
commit | 9a65a0bb23ee5835eb84165163eed05c958cb8e7 (patch) | |
tree | 62bdfb100a3e23dfee3985b84c3f9e62c074533f | |
parent | e6be19efbc42125896ed5db29673fec32b09c72f (diff) | |
download | flup-9a65a0bb23ee5835eb84165163eed05c958cb8e7.tar.gz |
Fix illusive problem with AJP implementation.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | flup/server/ajp_base.py | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2006-05-03 Allan Saddi <asaddi@kalahari.flup.org> + + * 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 <asaddi@kalahari.flup.org> * 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:] |