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 2025/12/01 12:13:18 UTC

svn commit: r1930171 - in httpd/test/framework/trunk/t: conf modules

Author: covener
Date: Mon Dec  1 12:13:18 2025
New Revision: 1930171

Log:
check CGI header/env precedence

Modified:
   httpd/test/framework/trunk/t/conf/extra.conf.in
   httpd/test/framework/trunk/t/modules/cgi.t

Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in	Mon Dec  1 12:10:55 2025	(r1930170)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in	Mon Dec  1 12:13:18 2025	(r1930171)
@@ -434,6 +434,11 @@
     ScriptLogLength 51200
     ScriptLogBuffer 256
 
+    <IfModule mod_env.c>
+        SetEnv GATEWAY?INTERFACE "dummy/1.0"
+        SetEnv HTTP?host "localhost"
+    </ifModule>
+
     <Directory @SERVERROOT@/htdocs/modules/cgi>
         Options +ExecCGI
 

Modified: httpd/test/framework/trunk/t/modules/cgi.t
==============================================================================
--- httpd/test/framework/trunk/t/modules/cgi.t	Mon Dec  1 12:10:55 2025	(r1930170)
+++ httpd/test/framework/trunk/t/modules/cgi.t	Mon Dec  1 12:13:18 2025	(r1930171)
@@ -11,6 +11,7 @@ my $have_apache_2050 = have_min_apache_v
 my $have_apache_2460 = have_min_apache_version "2.4.60";
 
 my $script_log_length = 51200;
+my $htdocs = Apache::Test::vars('documentroot');
 
 ## mod_cgi test
 ##
@@ -95,6 +96,15 @@ my %test = (
         'rc' => 200,
         'expect' => 'this is nph-stdout'
     },
+    'env.pl?gateway' => {
+        'rc' => 200,
+        'expect' => 'GATEWAY_INTERFACE = CGI/1.1'
+    },
+    'env.pl?host' => {
+        'rc' => 200,
+        'expect' => 'HTTP_HOST = example.com'
+    },
+
 );
 
 #XXX: find something that'll on other platforms (/bin/sh aint it)