[Zope3-dev] Re: ZPT missing header
Hi On 2007-03-19 10:43:57 +0100, "Stefan H. Holek" <[EMAIL PROTECTED]> said: Hold! Isn't it so that the meta header is used when reading the file from disk, i.e. to know which charset to decode from? How does this correspond to the encoding (and meta header) used when *serving* that template? I don't think it does at all, and stripping the header on read looks pretty sensible to me. Right. You are right. :) So that is the reason for removing it. I'll add a note to the source so it's clear why this is happening an why it *must* be done. Thanks Stefan -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: ZPT missing header
Hold! Isn't it so that the meta header is used when reading the file from disk, i.e. to know which charset to decode from? How does this correspond to the encoding (and meta header) used when *serving* that template? I don't think it does at all, and stripping the header on read looks pretty sensible to me. Stefan On 19. Mär 2007, at 10:33, Christian Zagrodnick wrote: On 2007-03-10 08:20:04 +0100, "Dieter Maurer" <[EMAIL PROTECTED]> said: Christian Zagrodnick wrote at 2007-3-9 15:07 +0100: ... zope.pagetemplate.pagetemplatefile is removing the header. So it is the pagetemplate, yes. It did so for resources as well. But *only* for the plain HTML header, *not* an XHTML header. I don't see why they should behave different. While I agree that they should behave identical, I do not see a reason to remove the header. Why adding additional complexity, which may introduce bugs (as we have seen)? Right. I just wonder about the intensions to remove it initially. If nobody objects I will remove the stripping of the HTML header (as time allows). -- It doesn't necessarily do it in chronological order, though. --Douglas Adams ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: ZPT missing header
On 2007-03-10 08:20:04 +0100, "Dieter Maurer" <[EMAIL PROTECTED]> said: Christian Zagrodnick wrote at 2007-3-9 15:07 +0100: ... zope.pagetemplate.pagetemplatefile is removing the header. So it is the pagetemplate, yes. It did so for resources as well. But *only* for the plain HTML header, *not* an XHTML header. I don't see why they should behave different. While I agree that they should behave identical, I do not see a reason to remove the header. Why adding additional complexity, which may introduce bugs (as we have seen)? Right. I just wonder about the intensions to remove it initially. If nobody objects I will remove the stripping of the HTML header (as time allows). -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: ZPT missing header
Christian Zagrodnick wrote at 2007-3-9 15:07 +0100: > ... >zope.pagetemplate.pagetemplatefile is removing the header. So it is the >pagetemplate, yes. It did so for resources as well. But *only* for the >plain HTML header, *not* an XHTML header. I don't see why they should >behave different. While I agree that they should behave identical, I do not see a reason to remove the header. Why adding additional complexity, which may introduce bugs (as we have seen)? -- Dieter ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: ZPT missing header
On 2007-03-09 14:55:46 +0100, Stephan Richter <[EMAIL PROTECTED]> said: On Friday 09 March 2007 08:32, Christian Zagrodnick wrote: Frankly I have no idea why it is *removing* the http-equiv then. Maybe because it is redundant. But it would be easy to just keep it. So, is PT removing http-equiv? If this is the behavior in page templates all along and just got fixed for resources, then we will adjust our code. Not exactly. zope.pagetemplate.pagetemplatefile is removing the header. So it is the pagetemplate, yes. It did so for resources as well. But *only* for the plain HTML header, *not* an XHTML header. I don't see why they should behave different. I stumbled upon that when inserting an XHTML file with a BOM. This file was published as text/plain while a HTML file with a BOM was published as text/html. Thanks a lot for the clarification. You are welcome. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: ZPT missing header
On Friday 09 March 2007 08:32, Christian Zagrodnick wrote: > Frankly I have no idea why it is *removing* the http-equiv then. Maybe > because it is redundant. But it would be easy to just keep it. So, is PT removing http-equiv? If this is the behavior in page templates all along and just got fixed for resources, then we will adjust our code. Thanks a lot for the clarification. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: ZPT missing header
Hi On 2007-03-09 13:40:17 +0100, Stephan Richter <[EMAIL PROTECTED]> said: On Thursday 08 March 2007 21:06, Roger Ineichen wrote: Some test do not pass in our application with the newest Zope3 trunk. Can somebody explain what's happen to the meta header info. In our Page Template the following header get lost: /> Roger forgot to mention that this is probably due to this checkin: See checkin 73025 from zagy: - zope.pagetemplate.pagetemplatefile introspects the html http-equiv header to guess the content encoding. This did not work for XHTML content. - zope.app.publisher.browser.pagetemplateresource sets the Content-T ype header like the other page templates do it. This basically fixes page templates in resource directories having a byte order mark. Those were delivered as text/plain. If we do not get an explanation what happens here including a fix, I am goi ng to revert this checkin. The point is, that a header like i.e. plain old HTML was going away all along. I made it consistent so there is the same behaviour for HTML and XHTML. What the PT resource does is taking the http-equiv header and making a real HTTP header out of it. Frankly I have no idea why it is *removing* the http-equiv then. Maybe because it is redundant. But it would be easy to just keep it. -- Christian Zagrodnick gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com