Dave Hodgkinson <[EMAIL PROTECTED]> writes:
> I might have missed something here earlier, but is there a way of
> setting:
>
> $r->content_type("text/html; charset=$charset") ;
>
> from within Apache::Template?
Ah, in Template::Apache::Service.pm we have:
#------------------------------------------------------------------------
# headers($request, $template, $content_ref)
#
# Set and then send the required http headers.
#------------------------------------------------------------------------
sub headers {
my ($self, $r, $template, $content) = @_;
my $headers = $self->{ SERVICE_HEADERS };
my $all = $headers->{ all };
$r->content_type('text/html');
$r->headers_out->add('Last-Modified' => ht_time($template->modtime()))
if $all or $headers->{ modified } and $template;
$r->headers_out->add('Content-Length' => length $$content)
if $all or $headers->{ length };
$r->send_http_header;
}
If this is part of a chain of perl handlers, where the first one sets
$r->content_type('text/html; charset=...'); should Just Work, right?
Seems a bit Imperialist, overwriting any charset setting, hm?
--
David Hodgkinson, Wizard for Hire http://www.davehodgkinson.com
Editor-in-chief, The Highway Star http://www.deep-purple.com
Deep Purple Family Tree news http://www.slashrock.com
Interim Technical Director, Web Architecture Consultant for hire