httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1799955 - in /httpd/test/framework/trunk/t: conf/proxy.conf.in modules/proxy_fcgi.t
Date Mon, 26 Jun 2017 17:17:58 GMT
Author: jchampion
Date: Mon Jun 26 17:17:57 2017
New Revision: 1799955

URL: http://svn.apache.org/viewvc?rev=1799955&view=rev
Log:
proxy_fcgi.t: add Action regression test

Note that this is meant only as a compatibility regression test, to keep
some poor soul from accidentally forgetting about it and busting it. I'm
not able to find a backend yet that works with this config.

Modified:
    httpd/test/framework/trunk/t/conf/proxy.conf.in
    httpd/test/framework/trunk/t/modules/proxy_fcgi.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=1799955&r1=1799954&r2=1799955&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/proxy.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/proxy.conf.in Mon Jun 26 17:17:57 2017
@@ -97,6 +97,16 @@
         </Files>
       </Directory>
     </IfModule>
+
+    <IfModule mod_actions.c>
+      <Directory @SERVERROOT@/htdocs/modules/proxy/fcgi-action>
+        AddType application/x-fcgi-action .php
+        Action application/x-fcgi-action /fcgi-action-virtual virtual
+      </Directory>
+      <Location /fcgi-action-virtual>
+        SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
+      </Location>
+    </IfModule>
   </VirtualHost>
 </IfModule>
 

Modified: httpd/test/framework/trunk/t/modules/proxy_fcgi.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy_fcgi.t?rev=1799955&r1=1799954&r2=1799955&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy_fcgi.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy_fcgi.t Mon Jun 26 17:17:57 2017
@@ -10,7 +10,7 @@ my $have_fcgibackendtype = have_min_apac
 
 plan tests => (7 * $have_fcgisetenvif) + (2 * $have_fcgibackendtype) +
                (2 * $have_fcgibackendtype * have_module('rewrite')) +
-               (7 * have_module('rewrite')) + 2,
+               (7 * have_module('rewrite')) + (7 * have_module('actions')) + 2,
      need (
         'mod_proxy_fcgi',
         'FCGI',
@@ -199,6 +199,28 @@ if (have_module('rewrite')) {
              "Default REDIRECT_URL uses original client URL");
 }
 
+if (have_module('actions')) {
+    # Regression test to ensure that the bizarre Action invocation for FCGI
+    # still works as it did in 2.4.20. Almost none of this follows any spec at
+    # all. As far as I can tell, this method does not work with FPM.
+    $envs = run_fcgi_envvar_request($fcgi_port, "/modules/proxy/fcgi-action/index.php/path/info?query");
+
+    ok t_cmp($envs->{'SCRIPT_FILENAME'}, "proxy:fcgi://127.0.0.1:" . $fcgi_port
+                                         . $docroot
+                                         . '/fcgi-action-virtual',
+             "Action SCRIPT_FILENAME has proxy:fcgi prefix and uses virtual action Location");
+    ok t_cmp($envs->{'SCRIPT_NAME'}, '/fcgi-action-virtual',
+             "Action SCRIPT_NAME is the virtual action Location");
+    ok t_cmp($envs->{'PATH_INFO'}, '/modules/proxy/fcgi-action/index.php/path/info',
+             "Action PATH_INFO contains full URI path");
+    ok t_cmp($envs->{'PATH_TRANSLATED'}, $docroot . '/modules/proxy/fcgi-action/index.php/path/info',
+             "Action PATH_TRANSLATED contains full URI path");
+    ok t_cmp($envs->{'QUERY_STRING'}, 'query',
+             "Action QUERY_STRING is correct");
+    ok t_cmp($envs->{'REDIRECT_URL'}, '/modules/proxy/fcgi-action/index.php/path/info',
+             "Action REDIRECT_URL uses original client URL");
+}
+
 # Regression test for PR61202.
 $envs = run_fcgi_envvar_request($fcgi_port, "/modules/proxy/fcgi/index.php");
 



Mime
View raw message