From 0f81929bbc34e18857388d4f1d84a72ed4457094 Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Tue, 26 Oct 2004 10:59:33 +0000 Subject: [PATCH] Only set content type for text/* git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@270 48953598-375a-da11-a14b-00016c27c3ee --- lib/Apache/MVC.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 7c016eb..ec701d0 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -43,7 +43,9 @@ sub parse_args { sub send_output { my $r = shift; $r->{ar}->content_type( - $r->{content_type} . "; charset=" . $r->{document_encoding} ); + $r->{content_type} =~ m/^text/ ? + $r->{content_type} . "; charset=" . $r->{document_encoding} : + $r->{content_type} ); $r->{ar}->headers_out->set( "Content-Length" => length $r->{output} ); APACHE2 || $r->{ar}->send_http_header; $r->{ar}->print( $r->{output} ); -- 2.39.5