Hmm.. this sounds like it might be the same bug I reported before the new year, (http://lists.zope.org/pipermail/zope/1999-December/015874.html) but I didn't see it on Linux, just FreeBSD... what OS are you using? -steve
"Adam" == Adam Karpierz <karpierz@itl.pl> writes:
Adam> I think, that I found a bug of ZPublisher in Zope 2.x.x (I Adam> not checked 2.1.2). This bug produces abnormal output Adam> (cutes end of file) for files of text/html type when it Adam> publishes as File object. I attached original and patched Adam> file as atachments (from Zope2.1.1). (sorry.. but I not have Adam> diff utility) Adam> Sorry for my "english"... :(
Hmm.. this sounds like it might be the same bug I reported before the new year, (http://lists.zope.org/pip ermail/zope/1999-December/015874.html) but I didn't see it on Linux, just FreeBSD... what OS are you using?
I think than not the same. It happens for every files and not depend on kind of OS. The reason of this bug is increase of self.body (adding <base href=..></base>) but without increasing 'content-length' HTTP header in method HTTPResponse.insertBase from file Zope/lib/python/ZPublisher/HTTPResponse.py ================================= def insertBase(self, base_re_search=rege .compile('\(<base[\0- ]+[^>]+>\)', regex.casefold).search ): if (self.headers.has_key('content-type') and self.headers['content-type'] != 'text/html'): return if self.base: body=self.body if body: e=end_of_header_search(body) if e >= 0: b=base_re_search(body) if b < 0: self.body=('%s\t<base href="%s">\n%s' % (body[:e],self.base,body[e:])) self.setHeader('content-length',len(self.body)) # above line is missing in original HTTPResposne.py Adam Karpierz karpierz@itl.pl
participants (2)
-
Adam Karpierz -
Steve Spicklemire