[Apache-dispatch-devel] SF.net SVN: apache-dispatch: [55] trunk
Brought to you by:
geoffrey_young,
phred_moyer
|
From: <phr...@us...> - 2007-07-20 06:41:40
|
Revision: 55
http://svn.sourceforge.net/apache-dispatch/?rev=55&view=rev
Author: phred_moyer
Date: 2007-07-19 23:41:37 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Add a test for <Location /> and fix the handling for that case. Although
we do not advertise this feature, I need it and probably so will others.
Modified Paths:
--------------
trunk/Changes
trunk/lib/Apache/Dispatch/Util.pm
trunk/t/01plain.t
trunk/t/conf/extra.last.conf.in
Modified: trunk/Changes
===================================================================
--- trunk/Changes 2006-10-24 05:23:15 UTC (rev 54)
+++ trunk/Changes 2007-07-20 06:41:37 UTC (rev 55)
@@ -1,5 +1,8 @@
Revision history for Perl extension Apache::Dispatch
+0.10_02 07.19.2007
+ - fix the unadvertised feature which allows handling <Location />
+
0.10_01 10.23.2006
- move common methods to Apache::Dispatch::Util and adjust @ISA for
Apache*::Dispatch modules to use common methods via inheritance - fred
Modified: trunk/lib/Apache/Dispatch/Util.pm
===================================================================
--- trunk/lib/Apache/Dispatch/Util.pm 2006-10-24 05:23:15 UTC (rev 54)
+++ trunk/lib/Apache/Dispatch/Util.pm 2007-07-20 06:41:37 UTC (rev 55)
@@ -350,8 +350,8 @@
else {
# <Location />
- $prefix .= "::";
- $times = $class_and_method =~ s/^/$prefix/e;
+ $times = 1;
+ $class_and_method = $prefix;
}
unless ($times) {
Modified: trunk/t/01plain.t
===================================================================
--- trunk/t/01plain.t 2006-10-24 05:23:15 UTC (rev 54)
+++ trunk/t/01plain.t 2007-07-20 06:41:37 UTC (rev 55)
@@ -4,7 +4,7 @@
use Apache::Test qw(ok plan :withtestmore );
use Apache::TestRequest qw(GET GET_OK);
-plan tests => 4, need_lwp;
+plan tests => 5, need_lwp;
# Test Apache2::Foo->dispatch_index
my $uri = '/plain';
@@ -24,3 +24,6 @@
$uri = '/plain/bar/baz';
ok GET_OK $uri;
+# Test root location special case
+$uri = '/';
+ok GET_OK $uri
Modified: trunk/t/conf/extra.last.conf.in
===================================================================
--- trunk/t/conf/extra.last.conf.in 2006-10-24 05:23:15 UTC (rev 54)
+++ trunk/t/conf/extra.last.conf.in 2007-07-20 06:41:37 UTC (rev 55)
@@ -6,6 +6,21 @@
PerlModule Apache::Dispatch
</IfDefine>
+ <Location />
+ SetHandler perl-script
+ DispatchRequire On
+ DispatchDebug 2
+ DispatchUpperCase On
+ <IfDefine APACHE2>
+ DispatchPrefix Apache2::Foo
+ PerlResponseHandler Apache2::Dispatch
+ </IfDefine>
+ <IfDefine APACHE1>
+ PerlHandler Apache::Dispatch
+ DispatchPrefix Apache::Foo
+ </IfDefine>
+ </Location>
+
<Location /plain>
SetHandler perl-script
DispatchRequire On
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|