[Zope3-dev] Re: ZPT missing header
Christian Zagrodnick
cz at gocept.com
Fri Mar 9 08:32:56 EST 2007
Hi
On 2007-03-09 13:40:17 +0100, Stephan Richter
<srichter at cosmos.phy.tufts.edu> 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:
>>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
> />
>
> 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
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
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
More information about the Zope3-dev
mailing list