Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 8648
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: SIMONFLK [...] cpan.org
Requestors: dhoworth [...] mrc-lmb.cam.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.04
Fixed in: (no value)

Attachments
cgi-maypole-default-page-patch



Subject: patch to CGI default page handling
When using a system based on CGI::Maypole, if a user types: http://localhost/cgi-bin/beer.cgi/ they see the frontpage of the database. But if they type http://localhost/cgi-bin/beer.cgi they see something like "Internal Server Error". It seems unreasonable to penalise the user so hard for leaving off a slash, so I've added a line to CGI::Maypole::parse_location(): --- CGI/Maypole.pm Thu Oct 28 14:16:08 2004 +++ CGI/Maypole.pm Mon Nov 29 14:43:44 2004 @@ -21,6 +21,7 @@ $self->{path} = $self->{cgi}->url( -absolute => 1, -path_info => 1 ); my $loc = $self->{cgi}->url( -absolute => 1 ); no warnings 'uninitialized'; + $self->{path} .= '/' if $self->{path} eq $loc; $self->{path} =~ s/^($loc)?\///; $self->parse_path; $self->parse_args; It would be great if this can make it into the release. Cheers, Dave
Download cgi-maypole-default-page-patch
application/octet-stream 405b

Message body not shown because it is not plain text.