You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2021/10/22 00:50:09 UTC

svn commit: r1894461 - in /httpd/test/framework/trunk/t: conf/extra.conf.in htdocs/modules/dir/htaccess/sub1/ htdocs/modules/dir/htaccess/sub1/index.html modules/dir.t

Author: covener
Date: Fri Oct 22 00:50:08 2021
New Revision: 1894461

URL: http://svn.apache.org/viewvc?rev=1894461&view=rev
Log:
test mod_dir additions

Added:
    httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/
    httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/index.html
Modified:
    httpd/test/framework/trunk/t/conf/extra.conf.in
    httpd/test/framework/trunk/t/modules/dir.t

Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1894461&r1=1894460&r2=1894461&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Fri Oct 22 00:50:08 2021
@@ -493,6 +493,14 @@ Alias /manual @inherit_documentroot@/man
 
 <IfModule mod_dir.c>
     <Directory @SERVERROOT@/htdocs/modules/dir/htaccess>
+        DirectorySlash OFF
+    </Directory>
+  <IfVersion >= 2.5.1>
+    <Directory @SERVERROOT@/htdocs/modules/dir/htaccess/sub>
+        DirectorySlash NotFound
+    </Directory>
+  </IfVersion>
+    <Directory @SERVERROOT@/htdocs/modules/dir/htaccess>
         AllowOverride Indexes
     </Directory>
 </IfModule>

Added: httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/index.html
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/index.html?rev=1894461&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/index.html (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/dir/htaccess/sub1/index.html Fri Oct 22 00:50:08 2021
@@ -0,0 +1 @@
+dir index

Modified: httpd/test/framework/trunk/t/modules/dir.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/dir.t?rev=1894461&r1=1894460&r2=1894461&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/dir.t (original)
+++ httpd/test/framework/trunk/t/modules/dir.t Fri Oct 22 00:50:08 2021
@@ -20,7 +20,7 @@ sub my_chomp {
     $actual =~ s/[\r\n]+$//s;
 }
 
-plan tests => @bad_index * @index * 5 + @bad_index + 5, need_module 'dir';
+plan tests => @bad_index * @index * 5 + @bad_index + 5 + 3, need_module 'dir';
 
 foreach my $bad_index (@bad_index) {
 
@@ -91,6 +91,21 @@ $actual = GET_BODY $url;
 my_chomp();
 ok ($actual eq $expected);
 
+# DirectorySlash stuff
+my $res = GET "/modules/dir", redirect_ok => 0;
+ok ($res->code == 301);
+$res = GET "/modules/dir/htaccess", redirect_ok => 0;
+ok ($res->code == 403);
+
+if (have_min_apache_version('2.5.1')) { 
+    skip("missing DirectorySlash NotFound");
+}
+else { 
+    $res = GET "/modules/dir/htaccess/sub1", redirect_ok => 0;
+    ok ($res->code == 404);
+}
+
+
 sub write_htaccess {
     my $string = shift;