]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/CGI/Maypole.pm
Applied length patch for utf8.
[maypole.git] / lib / CGI / Maypole.pm
index db8cc75149dc180af39653c03484db0a88b5cd14..ddcf22240019251a6f11d035312aeba3adc262c4 100644 (file)
@@ -3,7 +3,8 @@ use base 'Maypole';
 
 use strict;
 use warnings;
-our $VERSION = "0.3";
+
+our $VERSION = '2.05';
 
 sub run {
     my $self = shift;
@@ -21,6 +22,7 @@ sub parse_location {
     my $loc = $self->{cgi}->url( -absolute => 1 );
     no warnings 'uninitialized';
     $self->{path} =~ s/^($loc)?\///;
+    $self->{path} .= '/' if $self->{path} eq $loc;
     $self->parse_path;
     $self->parse_args;
 }
@@ -41,7 +43,7 @@ sub send_output {
     print $r->{cgi}->header(
         -type           => $r->{content_type},
         -charset        => $r->{document_encoding},
-        -content_length => length $r->{output},
+        -content_length => do { use bytes; length $r->{output} }, 
     );
     print $r->{output};
 }