X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FCGI%2FMaypole.pm;h=ddcf22240019251a6f11d035312aeba3adc262c4;hb=6438c73c6e11a516bfb670397bfc57048ac94c44;hp=7da043c4665e7523836391af557f36199e9b2631;hpb=7637da3c79552ce54e8b71b880af799ddfd64eca;p=maypole.git diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 7da043c..ddcf222 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -4,7 +4,7 @@ use base 'Maypole'; use strict; use warnings; -our $VERSION = '2.04'; +our $VERSION = '2.05'; sub run { my $self = shift; @@ -22,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; } @@ -42,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}; }