From: seb bacon <[EMAIL PROTECTED]>
> As Martijn correctly pointed out, there seems to be a Content-length
> problem going on here. I did a lot more tests on two different 2.2
> servers, and have come closer to isolating the bug.
It's a ZPublisher/HTTPResponse.py bug. When you render a Folder, it inserts
the <base href=...> and adjusts the content-length. When the RESPONSE is
rendered, it notices that the </head> is missing and tries to fix your HTML
(adding precisely 14 bytes), but doesn't bother to re-adjust the
I've fixed this in CVS by removing the code that attempts to fix HTML, since
that is *wrong* behavior. You can do the same by removing the following
isHTML = split(headers.get('content-type', ''),
';') == 'text/html'
if isHTML and end_of_header_search(self.body) < 0:
if lhtml >= 0:
body='%s<head></head>\n%s' % (body[:lhtml],body[lhtml:])
body='<html><head></head>\n' + body
body='<html><head></head>\n' + body + '\n</html>\n'
Evan @ digicool & 4-am
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -