[Maypole] content-type forced to text/html

Sebastian Riedel sri@oook.de
Thu, 02 Dec 2004 09:04:37 +0100


Benjamin Reed:
> I've started setting up a simple site using maypole, but I'm running 
> into an annoying rendering issue in firefox because anything under the 
> control of maypole gets sent as "text/html", even if it's just passing 
> through serving a .css file to apache proper.
> 
> Is there a way to tell maypole to server it's own stuff as text/html, 
> but for anything else to *not* set the content-type, and let apache 
> figure it out?
> 

No it's not that simple, when Maypole sends you a css file it's handling
it like a normal TT2 template, it doesn't know it isn't.

You can put something like this in your additional_data()

$r->content_type('text/css') if $r->template =~ /\.css$/;

or this in your css file. ;)

[% request.content_type('text/css') %]

sebastian