]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC.pm
Apache::MVC version fixed
[maypole.git] / lib / Apache / MVC.pm
index 7c016ebc82060866b54466985f9ffc1242979f0e..203e39449af843943ab904dfb8609adc2afe88f8 100644 (file)
@@ -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} );