[Zope-dev] Bug in Medusa / ZServer?
Andrew M. Kuchling
akuchlin@mems-exchange.org
Tue, 7 Mar 2000 16:43:07 -0500 (EST)
Alexander Limi writes:
>[/opt/zope-mp3/ZServer/medusa/http_server.py|collect_incoming_data|435]
>[/opt/zope-mp3/ZServer/medusa/http_server.py|collect_incoming_data|143]
>[/opt/zope-mp3/ZServer/HTTPServer.py|collect_incoming_data|300])
>Is this a bug in Medusa or ZServer?
Who knows? Do a bit more digging and look at the code... Line 300 of
HTTPServer.py is self.data.write(data) . The 'data' attribute is
assigned to around line 190 in the same file, but only if a non-zero
Content-Length header is found a few lines before. So, log the value
of request.header, and see what's wrong. Is there a Content-Length
header? Does it have a value of 0? Does the CONTENT_LENGTH regular
expression miss it? (It might; the pattern seems too fragile,
breaking if there's unexpected whitespace, as in
'Content-Length:<space><space>123'.)
--
A.M. Kuchling http://starship.python.net/crew/amk/
"I feel disoriented."
"This is the Disorientation Centre."
"That makes sense."
-- The Doctor and Sarah, in "The Android Invasion"