DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19320>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19320

SCRIPT_NAME incorrect for virtual include with path info

           Summary: SCRIPT_NAME incorrect for virtual include with path info
           Product: Apache httpd-1.3
           Version: 1.3.27
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_include
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


When a CGI script is invoked (with additionalfrom mod_include, the setting of
the CGI variable SCRIPT_NAME is incorrect.

For a normal CGI program, SCRIPT_NAME will be the URL part which map to the
script, and PATH_INFO will contain any extra path information. When invoked from
mod_include virtual include, the PATH_INFO is not removed from SCRIPT_NAME.

According to the CGI standard, the script name is "virtual path to the script
being executed, used for self-referencing URL".

Test Case: The 'simple.cgi' is the "printenv" script.

Invoking: /~yair/xtest/code/simple.cgi/params,
Result: SCRIPT_NAME=/~yair/xtest/code/simple.cgi

Invoking: the same URL from mod_include
Result: SCRIPT_NAME=/~yair/xtest/code/simple.cgi/params

As a side comment, I tested the same script using mod_perl, and got the same
results.


The simple.shtml script:
<html>
<body>
<pre>
========================= CGI
<!--#include virtual="code/simple.cgi/params"-->
</pre>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to