->cleanup feature. (RT#41442)
- Ensure that Catalyst::Engine::HTTP's options hash is defined before
dereferencing it. (RT#49267)
+ - Fix regex special characters in REDIRECT_URL variable breaking
+ the request base. (2nd part of RT#24951)
New features:
- Setting __PACKAGE__->config(enable_catalyst_header => 1); in your MyApp.pm
my $base_path;
if ( exists $ENV{REDIRECT_URL} ) {
$base_path = $ENV{REDIRECT_URL};
- $base_path =~ s/$ENV{PATH_INFO}$//;
+ $base_path =~ s/\Q$ENV{PATH_INFO}\E$//;
}
else {
$base_path = $script_name || '/';
is ''.$r->base, 'http://www.foo.com/tx/';
}
+# test req->base and c->uri_for work correctly after an internally redirected request
+# (i.e. REDIRECT_URL set) when the PATH_INFO contains a regex
+{
+ my $path = '/engine/request/uri/Rx(here)';
+ my $r = get_req (
+ SCRIPT_NAME => '/',
+ PATH_INFO => $path,
+ REQUEST_URI => $path,
+ REDIRECT_URL => $path,
+ );
+
+ is $r->path, 'engine/request/uri/Rx(here)', 'URI contains correct path';
+ is $r->base, 'http://www.foo.com/', 'Base is correct';
+}
+
# FIXME - Test proxy logic
# - Test query string