From: Marcus Ramberg Date: Tue, 26 Oct 2004 10:59:33 +0000 (+0000) Subject: Only set content type for text/* X-Git-Tag: 2.10~92 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0f81929bbc34e18857388d4f1d84a72ed4457094;p=maypole.git Only set content type for text/* git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@270 48953598-375a-da11-a14b-00016c27c3ee --- 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} );