Subject: | Double dots in request paths results in process stall |
If the request path contains two dots, like /double/demo..ext, the process which handle the request stuck. These begins with 5.90113, 5.90112 handle this correct. Maybe this is related to the changes for relative action methods.
Subject: | double-dot-path.t |
use Test::Most;
{
package MyApp::Controller::Root;
$INC{'MyApp/Controller/Root.pm'} = __FILE__;
use Moose;
use MooseX::MethodAttributes;
extends 'Catalyst::Controller';
__PACKAGE__->config->{namespace} = '';
sub default : Path {
my ( $self, $c ) = @_;
$c->response->status(200);
$c->response->body("Ok");
}
__PACKAGE__->meta->make_immutable;
package MyApp;
$INC{'MyApp.pm'} = __FILE__;
use Catalyst;
MyApp->setup;
}
use Catalyst::Test 'MyApp';
ok request '/';
ok request '/double/dot.ext';
ok request '/double/dot..ext';
done_testing();
Subject: | double-dot-test.patch |
diff --git a/t/double-dot-path.t b/t/double-dot-path.t
new file mode 100644
index 0000000..cd6156c
--- /dev/null
+++ b/t/double-dot-path.t
@@ -0,0 +1,39 @@
+use Test::Most;
+
+{
+ package MyApp::Controller::Root;
+ $INC{'MyApp/Controller/Root.pm'} = __FILE__;
+
+ use Moose;
+ use MooseX::MethodAttributes;
+
+ extends 'Catalyst::Controller';
+
+ __PACKAGE__->config->{namespace} = '';
+
+ sub default : Path {
+
+ my ( $self, $c ) = @_;
+
+ $c->response->status(200);
+ $c->response->body("Ok");
+ }
+
+ __PACKAGE__->meta->make_immutable;
+
+ package MyApp;
+ $INC{'MyApp.pm'} = __FILE__;
+
+ use Catalyst;
+
+ MyApp->setup;
+}
+
+use Catalyst::Test 'MyApp';
+
+ok request '/';
+ok request '/double/dot.ext';
+ok request '/double/dot..ext';
+
+done_testing();
+