Perrin Harkins wrote:
>       # print content-type and process template
>       $request->content_type('text/html');
>       $TT->process($request->filename(), { 'uri' => $request->uri },
> $request ) || do
>       {
>         $request->log_reason( $TT->error() );
>         return SERVER_ERROR;
>       };

It doesn't look like you're sending a header.  Make sure you imported
the OK constant correctly as well.

I'm importing the constants:
   use Apache2::Const qw(:common);

and sending the headers:
   $request->content_type($ContentType);

and i'm certainly getting correct headers back.  this is the exact response:
   HTTP/1.1 200 OK
   Date: Wed, 12 Jul 2006 12:55:23 GMT
   Server: Apache
   Connection: close
   Content-Type: text/html; charset=ISO-8859-1

   <hml><bdy>Ti13</bdy></hml>

the mangling seems to be occuring somewhere within these TT calls:
   $TT = Template->new({
     INCLUDE_PATH => '/home/test/public_html',
     ABSOLUTE     => 1,
     CACHE_SIZE   => undef,
     COMPILE_DIR  => '/home/test/cache',
     COMPILE_EXT  => '.ttc'
   });

   $TT->process($request->filename(), \%data, $request ) || do
   {
     $request->log_reason( $TT->error() );
     return SERVER_ERROR;
   };

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to