You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/09/29 09:39:45 UTC

svn commit: r1938687 - httpd/httpd/trunk/test/pyhttpd

Author: jorton
Date: Tue Sep 29 09:39:44 2026
New Revision: 1938687

Log:
* test/pyhttpd/env.py (HttpdTestSetup._install): Fix shebang line and set
  the executable bit for .cgi scripts as well as .py scripts, so CGI
  scripts not named *.py can be run on Windows where the interpreter is
  located from the script shebang.

Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>

Modified:
   httpd/httpd/trunk/test/pyhttpd/env.py

Modified: httpd/httpd/trunk/test/pyhttpd/env.py
==============================================================================
--- httpd/httpd/trunk/test/pyhttpd/env.py	Tue Sep 29 09:13:24 2026	(r1938686)
+++ httpd/httpd/trunk/test/pyhttpd/env.py	Tue Sep 29 09:39:44 2026	(r1938687)
@@ -221,7 +221,7 @@ class HttpdTestSetup:
                             open(fpath, 'wb').write(data.replace(b'\r\n', b'\n'))
                     except OSError:
                         pass
-                if re.match(r'.+\.py', fname):
+                if re.search(r'\.(py|cgi)$', fname):
                     if sys.platform == "win32":
                         self._fix_shebang(fpath)
                     st = os.stat(fpath)