You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2015/06/22 17:56:06 UTC

svn commit: r1686886 - in /httpd/test/framework/trunk/t: conf/extra.conf.in modules/alias.t

Author: ylavic
Date: Mon Jun 22 15:56:06 2015
New Revision: 1686886

URL: http://svn.apache.org/r1686886
Log:
Tests for Redirect* using non-redirect status, starting from 2.4.15.

Modified:
    httpd/test/framework/trunk/t/conf/extra.conf.in
    httpd/test/framework/trunk/t/modules/alias.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=1686886&r1=1686885&r2=1686886&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Mon Jun 22 15:56:06 2015
@@ -329,11 +329,13 @@
     Redirect temp /temp http://@SERVERNAME@:@PORT@/alias
     Redirect seeother /seeother http://@SERVERNAME@:@PORT@/alias
     Redirect gone /gone
+    Redirect 403 /forbid
 
     RedirectMatch permanent /p([0-9]) http://@SERVERNAME@:@PORT@/alias/$1.html
     RedirectMatch temp /t([0-9]) http://@SERVERNAME@:@PORT@/alias/$1.html
     RedirectMatch seeother /s([0-9]) http://@SERVERNAME@:@PORT@/alias/$1.html
     RedirectMatch gone /g([0-9])
+    RedirectMatch 403 /f([0-9])
 
     RedirectTemp /temp2 http://@SERVERNAME@:@PORT@/alias/index.html
     RedirectPermanent /perm2 http://@SERVERNAME@:@PORT@/alias/index.html
@@ -344,7 +346,7 @@
     ScriptAliasMatch /aliascgi-(.*) @SERVERROOT@/htdocs/modules/alias/$1
 
     <IfDefine APACHE2>
-        <IfVersion >= 2.5.0>
+        <IfVersion >= 2.4.15>
             <LocationMatch /expr/ali(?<number>[0-9])>
                 Alias @SERVERROOT@/htdocs/modules/alias/%{env:MATCH_NUMBER}.html
             </LocationMatch>
@@ -363,6 +365,9 @@
             <LocationMatch /expr/g([0-9])>
                 Redirect gone
             </LocationMatch>
+            <LocationMatch /expr/f([0-9])>
+                Redirect 403
+            </LocationMatch>
         </IfVersion>
     </IfDefine>
 </IfModule>

Modified: httpd/test/framework/trunk/t/modules/alias.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/alias.t?rev=1686886&r1=1686885&r2=1686886&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/alias.t (original)
+++ httpd/test/framework/trunk/t/modules/alias.t Mon Jun 22 15:56:06 2015
@@ -19,7 +19,8 @@ my %redirect = (
     temp     =>  '302',
     temp2    =>  '302',
     seeother =>  '303',
-    gone     =>  '410'
+    gone     =>  '410',
+    forbid   =>  '403'
 );
 
 ## RedirectMatch testing ##
@@ -30,14 +31,15 @@ my %rm_body = (
 
 my %rm_rc = (
     s   =>  '303',
-    g   =>  '410'
+    g   =>  '410',
+    f   =>  '403'
 );
 
 #XXX: find something that'll on other platforms (/bin/sh aint it)
 my $script_tests = WINFU ? 0 : 4;
 
-my $tests = (keys %redirect) + (keys %rm_body) * (1 + have_min_apache_version("2.5")) * 10 +
-            (keys %rm_rc) * (1 + have_min_apache_version("2.5")) * 10 + have_min_apache_version("2.5") * 11 + 12 + $script_tests;
+my $tests = (keys %redirect) + (keys %rm_body) * (1 + have_min_apache_version("2.4.15")) * 10 +
+            (keys %rm_rc) * (1 + have_min_apache_version("2.4.15")) * 10 + have_min_apache_version("2.4.15") * 11 + 12 + $script_tests;
 
 #LWP required to follow redirects
 plan tests => $tests, need need_module('alias'), need_lwp;
@@ -60,7 +62,7 @@ for (my $i=0 ; $i <= 9 ; $i++) {
              "/ali$i");
 }
 
-if (have_min_apache_version("2.5")) {
+if (have_min_apache_version("2.4.15")) {
     t_debug "verifying expression alias match with /expr/ali[0-9].";
     for (my $i=0 ; $i <= 9 ; $i++) {
         ok t_cmp((GET_BODY "/expr/ali$i"),
@@ -93,7 +95,7 @@ foreach (sort keys %rm_body) {
     }
 }
 
-if (have_min_apache_version("2.5")) {
+if (have_min_apache_version("2.4.15")) {
     print "verifying body of perm and temp redirect match with expression support\n";
     foreach (sort keys %rm_body) {
         for (my $i=0 ; $i <= 9 ; $i++) {
@@ -121,7 +123,7 @@ foreach (keys %rm_rc) {
     }
 }
 
-if (have_min_apache_version("2.5")) {
+if (have_min_apache_version("2.4.15")) {
     print "verifying return code of seeother and gone redirect match with expression support\n";
     foreach (keys %rm_rc) {
         ## make LWP not follow the redirect since we
@@ -181,7 +183,7 @@ else {
     skip "skipping test without CGI module";
 }
 
-if (have_min_apache_version("2.5")) {
+if (have_min_apache_version("2.4.15")) {
     if (have_cgi) {
         ## with ScriptAlias in LocationMatch ##
         t_debug "verifying ScriptAlias in LocationMatch with /expr/aliascgi-script";