X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FApache%2FMVC.pm;h=203e39449af843943ab904dfb8609adc2afe88f8;hb=fef379e5f473ed4f21f9dc5fa6c36bf46a6b9729;hp=7c016ebc82060866b54466985f9ffc1242979f0e;hpb=15f2c20e85df52d515b73801a9af99ff4d6a3213;p=maypole.git diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 7c016eb..203e394 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -1,5 +1,7 @@ package Apache::MVC; +our $VERSION = '2.03'; + use strict; use warnings; @@ -17,8 +19,6 @@ if (APACHE2) { else { require Apache } require Apache::Request; -our $VERSION = "2.03"; - sub get_request { my ( $self, $r ) = @_; $self->{ar} = Apache::Request->new($r); @@ -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} );