Re: [Templates] CHanging content type under Apache::Template.

[prev] [thread] [next] [Date index for 2004/04/26]

From: Andy Wardley
Subject: Re: [Templates] CHanging content type under Apache::Template.
Date: 13:32 on 26 Apr 2004
Loïc Paillotin wrote:
> I use Apache::Template in order to display the content of a directory 
> ( your standard <Location /blah>... </Location> stuff) but I need to
> change the content-type of the response (switch from text/html to
> text/vnd.wap.wml ...) Is that posssible? 

No easy way, I'm afraid, but there is a way.

Subclass Template::Service::Apache and provide your own header() method.
There's not a lot to it, other than sending the content type and some 
extra headers.

Then use the following directive in the httpd.conf to invoke your new 
service module:

   TT2ServiceModule  Your::Service::Module

Alternately, if you're feeling adventurous, you could figure out how
to add the TT2ContentType configuration directive and then hack on 
the regular Template::Service::Apache::header() method to make this a
configurable option.

HTH
A



_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] CHanging content type under Apache::Template.
=?ISO-8859-1?Q?Lo=EFc?= Paillotin 13:09 on 26 Apr 2004

Re: [Templates] CHanging content type under Apache::Template.
Andy Wardley 13:32 on 26 Apr 2004

Re: [Templates] CHanging content type under Apache::Template.
=?ISO-8859-1?Q?Lo=EFc?= Paillotin 13:47 on 26 Apr 2004

Re: [Templates] CHanging content type under Apache::Template.
=?ISO-8859-1?Q?Lo=EFc?= Paillotin 07:52 on 27 Apr 2004

Re: [Templates] CHanging content type under Apache::Template.
merlyn (Randal L. Schwartz) 15:22 on 26 Apr 2004

[Templates] Re: Apache::Template 0.09 (was: changing content type)
merlyn (Randal L. Schwartz) 13:32 on 27 Apr 2004

Re: [Templates] Apache::Template 0.09
Geoffrey Young 21:38 on 27 Apr 2004

Re: [Templates] Apache::Template 0.09
merlyn (Randal L. Schwartz) 21:50 on 27 Apr 2004

Re: [Templates] Apache::Template 0.09
Geoffrey Young 22:07 on 27 Apr 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52