httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1775182 - in /httpd/test/framework/trunk: c-modules/test_utilities/mod_test_utilities.c t/conf/extra.conf.in t/modules/rewrite.t
Date Mon, 19 Dec 2016 21:47:43 GMT
Author: jchampion
Date: Mon Dec 19 21:47:43 2016
New Revision: 1775182

URL: http://svn.apache.org/viewvc?rev=1775182&view=rev
Log:
PR60478: fix 2.2 suite - lock test to 2.4

The test_utilities module uses ap_expr and was busting 2.2 tests.

Modified:
    httpd/test/framework/trunk/c-modules/test_utilities/mod_test_utilities.c
    httpd/test/framework/trunk/t/conf/extra.conf.in
    httpd/test/framework/trunk/t/modules/rewrite.t

Modified: httpd/test/framework/trunk/c-modules/test_utilities/mod_test_utilities.c
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/test_utilities/mod_test_utilities.c?rev=1775182&r1=1775181&r2=1775182&view=diff
==============================================================================
--- httpd/test/framework/trunk/c-modules/test_utilities/mod_test_utilities.c (original)
+++ httpd/test/framework/trunk/c-modules/test_utilities/mod_test_utilities.c Mon Dec 19 21:47:43
2016
@@ -1,10 +1,10 @@
+#define HTTPD_TEST_REQUIRE_APACHE 2.4
+
 /**
  * This module provides utility functions for other tests; it doesn't provide
  * test cases of its own.
  */
 
-#define HTTPD_TEST_REQUIRE_APACHE 2
-
 #define APACHE_HTTPD_TEST_EXTRA_HOOKS util_register_hooks
 #include "apache_httpd_test.h"
 

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=1775182&r1=1775181&r2=1775182&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Mon Dec 19 21:47:43 2016
@@ -256,6 +256,7 @@
    </VirtualHost>
 
    # PR60478: pathological rewrite expansion
+   <IfVersion >= 2.4>
    <Location /modules/rewrite/pr60478-rewrite-loop>
       # This pair of RewriteRules will loop but should eventually 500 once we
       # reach LimitRequestLine * 2 bytes. (In this case, 128 * 2 = 256.)
@@ -264,6 +265,7 @@
       RewriteCond expr "util_strlen(%{REQUEST_FILENAME}) -lt 257"
       RewriteRule X - [N]
    </Location>
+   </IfVersion>
 
 </IfModule>
 

Modified: httpd/test/framework/trunk/t/modules/rewrite.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/rewrite.t?rev=1775182&r1=1775181&r2=1775182&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/rewrite.t (original)
+++ httpd/test/framework/trunk/t/modules/rewrite.t Mon Dec 19 21:47:43 2016
@@ -115,6 +115,10 @@ if (have_module('mod_proxy') && have_cgi
     skip "Skipping rewrite QUERY_STRING test; missing proxy or CGI module" foreach (1..5);
 }
 
-# See PR 60478 and the corresponding config in extra.conf
-$r = GET("/modules/rewrite/pr60478-rewrite-loop/a/X/b/c");
-ok t_cmp($r->code, 500, "PR 60478 rewrite loop is halted");
+if (have_min_apache_version('2.4')) {
+    # See PR 60478 and the corresponding config in extra.conf
+    $r = GET("/modules/rewrite/pr60478-rewrite-loop/a/X/b/c");
+    ok t_cmp($r->code, 500, "PR 60478 rewrite loop is halted");
+} else {
+    skip "Skipping PR 60478 test; requires ap_expr in version 2.4"
+}



Mime
View raw message