[Templates] sending header as text/html
Ken Perl
kenperl@gmail.com
Tue, 22 May 2007 18:25:53 +0800
Dave,
I tried the put
[% USE CGI;
CGI.header %]
in the default-template, but it seems I still see the html source code
in the firefox2.0, any idea what is wrong? why it doesn't work?
On 5/21/07, Dave Cross <dave@dave.org.uk> wrote:
> Ken Perl wrote:
>
> > how can I include the code,
> >
> > print "Content-type: text/html\n\n";
>
> You know that only creates a _really_ correct CGI header on a Windows
> web server :)
>
> > into the wrapper default-template ? I use the wrapper like this,
> >
> > [% WRAPPER default-template %]
>
> Use the CGI plugin[1]. That'll get your line endings right too.
>
> [% USE CGI;
> CGI.header %]
>
> Dave...
>
> [1]
> http://www.template-toolkit.org/docs/plain/Modules/Template/Plugin/CGI.html
>
--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'