You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by John Pierce <jw...@r2systems.com> on 1997/09/08 10:30:01 UTC
mod_cgi/1101: In util_script.c/call_exec(), must use "#!interp" rather than "#! interp" in cgi scripts.
>Number: 1101
>Category: mod_cgi
>Synopsis: In util_script.c/call_exec(), must use "#!interp" rather than "#! interp" in cgi scripts.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Sep 8 01:30:01 1997
>Originator: jwp@r2systems.com
>Organization:
apache
>Release: 1.3a1
>Environment:
Win95, OSR2, IE4.0, VC 5.0
>Description:
If a cgi script starts with "#!interp", it works. If it starts with
"#! interp" (note space before "interp"), it fails. Clearly this is
not serious, but for compatibility with scripts coming from Unix boxes
it would be nice if the code in util_script.c/call_exec() flushed
leading spaces from the interpreter's name.
>How-To-Repeat:
Put a space between "#!" and "interp" in a cgi script and run it.
>Fix:
At line 621 in util_script.c
for(i = 2; interpreter[i] == ' '; ++i)
;
interpreter = interpreter + i%3
>Audit-Trail:
>Unformatted: