[Catalyst-commits] r12493 -
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Dec 30 15:55:44 GMT 2009
Author: t0m
Date: 2009-12-30 15:55:43 +0000 (Wed, 30 Dec 2009)
New Revision: 12493
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm
Log:
Fix regex special characters screwing things up by not using regexes
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm 2009-12-30 13:04:14 UTC (rev 12492)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm 2009-12-30 15:55:43 UTC (rev 12493)
@@ -167,7 +167,8 @@
# incorrect.
if (substr($req_uri, 0, 1) ne '/') {
my ($match) = $req_uri =~ m|^([^/]+)|;
- my ($path_info_part) = $path_info =~ m|^(.*?$match)|;
+ my $idx = index($path_info, $match) + length($match);
+ my $path_info_part = substr($path_info, 0, $idx);
substr($req_uri, 0, length($match), $path_info_part);
}
$path_info = $req_uri;
More information about the Catalyst-commits
mailing list