FAQ
per bobtfish, I'm writing about the RFC3875 paragraph of
Catalyst/Engine/CGI.pm rev 13152 around line 152.

This new bit of code is harming the current mapping REQUEST_URI +
PATH_INFO => $base_uri, which is used for dispatch.

In particular, I've got a set of mod_rewrite config clauses, which are
getting misdirected by this new code.

http://paste.scsys.co.uk/42123

If I understand the situation correctly, bobtfish has broken my
redirects in an attempt to address issues surrounding the encoding of
slash-containing query parameters. I have suggested to him that his
changes are hard to prove correct without a good spec for the above
mapping, and he's agreed to either remove the code or configure it off
by default.

for completeness, I've included the commenting-out bits that I used to
debug the problem.

Index: lib/Catalyst/Engine/CGI.pm
===================================================================
--- lib/Catalyst/Engine/CGI.pm (revision 13152)
+++ lib/Catalyst/Engine/CGI.pm (working copy)
@@ -156,6 +156,11 @@
# Here we try to resurrect the original encoded URI from REQUEST_URI.
my $path_info = $ENV{PATH_INFO};
if (my $req_uri = $ENV{REQUEST_URI}) {
+
+=pod
+
+disabled by djs
+
$req_uri =~ s/^\Q$base_path\E//;
$req_uri =~ s/\?.*$//;
if ($req_uri && $req_uri ne '/') {
@@ -169,6 +174,9 @@
if $path_info_part;
$path_info = $req_uri;
}
+
+=cut
+
}

# set the request URI
@@ -199,7 +207,9 @@
$base_path .= '/' unless $base_path =~ m{/$};

my $base_uri = $scheme . '://' . $host . $base_path;
-
+ use Data::Dumper;
+ $c->log->debug(Data::Dumper->Dump([$ENV{REQUEST_URI},$ENV{SCRIPT_NAME},$ENV{PATH_INFO},$path, $base_path],
+ [qw(REQUEST_URI SCRIPT_NAME PATH_INFO path base_path )]));
$c->request->base( bless \$base_uri, $uri_class );
}





Cheers!

--
Danny Sadinoff
danny@sadinoff.com

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupcatalyst-dev @
categoriescatalyst, perl
postedApr 21, '10 at 11:30p
activeMay 2, '10 at 10:44p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Tomas Doran: 2 posts Danny-Catalyst-Dev: 1 post

People

Translate

site design / logo © 2021 Grokbase