You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ge...@apache.org on 2005/09/30 15:13:53 UTC
svn commit: r292719 - in /perl/modperl/trunk/ModPerl-Registry/t:
conf/extra.conf.in dirindex.t
Author: geoff
Date: Fri Sep 30 06:13:51 2005
New Revision: 292719
URL: http://svn.apache.org/viewcvs?rev=292719&view=rev
Log:
add test to show DirectoryIndex works under certain
conditions
Added:
perl/modperl/trunk/ModPerl-Registry/t/dirindex.t
Modified:
perl/modperl/trunk/ModPerl-Registry/t/conf/extra.conf.in
Modified: perl/modperl/trunk/ModPerl-Registry/t/conf/extra.conf.in
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/t/conf/extra.conf.in?rev=292719&r1=292718&r2=292719&view=diff
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/t/conf/extra.conf.in (original)
+++ perl/modperl/trunk/ModPerl-Registry/t/conf/extra.conf.in Fri Sep 30 06:13:51 2005
@@ -37,6 +37,8 @@
#############################
<IfModule mod_alias.c>
Alias /registry/ @ServerRoot@/cgi-bin/
+ Alias /dirindex/ @ServerRoot@/cgi-bin/
+ Alias /dirindex2/ @ServerRoot@/cgi-bin/
Alias /registry_bb/ @ServerRoot@/cgi-bin/
Alias /registry_oo_conf/ @ServerRoot@/cgi-bin/
Alias /registry_prefork/ @ServerRoot@/cgi-bin/
@@ -64,6 +66,16 @@
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
</Location>
+
+<IfModule mod_dir.c>
+ <Location /dirindex>
+ AddHandler perl-script .pl
+ Options +ExecCGI
+ PerlResponseHandler ModPerl::Registry
+ PerlOptions +ParseHeaders
+ DirectoryIndex cgi.pl
+ </Location>
+</IfModule>
<Location /registry_modperl_handler>
SetHandler modperl
Added: perl/modperl/trunk/ModPerl-Registry/t/dirindex.t
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/t/dirindex.t?rev=292719&view=auto
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/t/dirindex.t (added)
+++ perl/modperl/trunk/ModPerl-Registry/t/dirindex.t Fri Sep 30 06:13:51 2005
@@ -0,0 +1,22 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest qw(GET);
+
+plan tests => 2, need [qw(mod_alias.c HTML::HeadParser mod_dir.c)],
+ need_min_module_version CGI => 3.08;
+
+{
+ my $url = "/dirindex/";
+ my $res = GET $url;
+
+ ok t_cmp($res->header('Content-type'),
+ qr{^text/html},
+ "DirectoryIndex + AddHandler - Content-type");
+
+ ok t_cmp(lc($res->content),
+ '<b>done</b>',
+ "DirectoryIndex + AddHandler - body");
+}