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

svn commit: r1890417 - in /httpd/test/framework/trunk/t: conf/proxy.conf.in htdocs/servlet/ htdocs/servlet/mapping.html modules/proxy.t

Author: jfclere
Date: Thu Jun  3 07:56:17 2021
New Revision: 1890417

URL: http://svn.apache.org/viewvc?rev=1890417&view=rev
Log:
Add tests from mapping=servlet

Added:
    httpd/test/framework/trunk/t/htdocs/servlet/
    httpd/test/framework/trunk/t/htdocs/servlet/mapping.html
Modified:
    httpd/test/framework/trunk/t/conf/proxy.conf.in
    httpd/test/framework/trunk/t/modules/proxy.t

Modified: httpd/test/framework/trunk/t/conf/proxy.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/proxy.conf.in?rev=1890417&r1=1890416&r2=1890417&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/proxy.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/proxy.conf.in Thu Jun  3 07:56:17 2021
@@ -6,6 +6,11 @@
         ProxyRequests On
     </VirtualHost>
 
+    <IfVersion >= 2.5.1>
+        # Test the mapping.
+        ProxyPass /mapping http://@SERVERNAME@:@PORT@/servlet mapping=servlet
+    </IfVersion>
+
 </IfModule>
 
 <IfModule mod_proxy_hcheck.c>

Added: httpd/test/framework/trunk/t/htdocs/servlet/mapping.html
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/servlet/mapping.html?rev=1890417&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/servlet/mapping.html (added)
+++ httpd/test/framework/trunk/t/htdocs/servlet/mapping.html Thu Jun  3 07:56:17 2021
@@ -0,0 +1 @@
+hello servlet

Modified: httpd/test/framework/trunk/t/modules/proxy.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy.t?rev=1890417&r1=1890416&r2=1890417&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy.t Thu Jun  3 07:56:17 2021
@@ -7,7 +7,7 @@ use Apache::TestUtil;
 use Apache::TestConfig ();
 use Misc;
 
-my $num_tests = 31;
+my $num_tests = 34;
 plan tests => $num_tests, need need_module 'proxy', need_module 'setenvif';
 
 Apache::TestRequest::module("proxy_http_reverse");
@@ -188,3 +188,17 @@ else {
     skip "skipping UDS tests with httpd < 2.4.7" foreach (1..2);
 }
 
+if (have_min_apache_version('2.5.1')) {
+
+    $r = GET("/notexisting/../mapping/mapping.html");
+    ok t_cmp($r->code, 200, "proxy mapping=servlet map it to /servlet/mapping.html");
+    
+    $r = GET("/notexisting/..;/mapping/mapping.html");
+    ok t_cmp($r->code, 200, "proxy mapping=servlet map it to /servlet/mapping.html");
+
+    $r = GET("/mapping/mapping.html");
+    ok t_cmp($r->code, 200, "proxy to /servlet/mapping.html");
+}
+else {
+    skip "skipping tests with mapping=servlet" foreach (1..3);
+}