Subject: | Catalyst Ignores the Trailing Slash |
The attached patch fixes a bug in which catalyst is agnostic to whether or not the URL contains a trailing slash. This is problematic because the behaviour of "../" etc. in regards to the user-agent depends on this fact.
Let me know if you'd also like a test. (which will require some work as I'm not familiar with the Catalyst testing system at all and have only started to work with Catalyst in the past few days.)
Regards,
Shlomi Fish
Index: lib/Catalyst/Engine.pm
===================================================================
--- lib/Catalyst/Engine.pm (revision 752)
+++ lib/Catalyst/Engine.pm (working copy)
@@ -523,7 +523,7 @@
sub prepare_action {
my $c = shift;
my $path = $c->req->path;
- my @path = split /\//, $c->req->path;
+ my @path = split /\//, $c->req->path, (-1);
$c->req->args( \my @args );
while (@path) {