X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FCGI%2FMaypole.pm;h=ddcf22240019251a6f11d035312aeba3adc262c4;hb=6438c73c6e11a516bfb670397bfc57048ac94c44;hp=db8cc75149dc180af39653c03484db0a88b5cd14;hpb=7dda5e1451220612c6ad749746d84e4c090e330c;p=maypole.git diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index db8cc75..ddcf222 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -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}; }