You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/09/15 04:02:10 UTC

DO NOT REPLY [Bug 12655] New: - SSI "include virtual" sometimes causing QUERY_STRING variable to be garbage.

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=12655>.
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=12655

SSI "include virtual" sometimes causing QUERY_STRING variable to be garbage.

           Summary: SSI "include virtual" sometimes causing QUERY_STRING
                    variable to be garbage.
           Product: Apache httpd-2.0
           Version: 2.0.40
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_include
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: bild@io.com


I have run into this problem in both 2.0.39 and 2.0.40.

Using httpd 2.0.40 in Linux Mandrake 8.2, compiled without any external modules
(but with --enable-rewrite), I have set the following things in httpd.conf:

AddHandler cgi-script .sgi
AddOutputFilter INCLUDES .sgi

My intent is to server-parse the output of cgi scripts whose filename ends with
.sgi.  This seems to work, if I print "<!--set VAR=\"FOO\" VALUE=\"bar\" -->\n"
; in the script, it is indeed set, so that code like:

<!--#include virtual="/cgi-bin/foo.sgi?$QUERY_STRING" -->
<!--#if expr="$FOO" -->
Foo is set.
<!--#else -->
Foo is not set.
<!--#endif -->

produces the expected final output "Foo is set.".

However, if I have several "include virtual" statements in the same .shtml file,
there appears to be a problem.  If I add more include virtual statements to this
file, like:

<!--#include virtual="/cgi-bin/foo.sgi?$QUERY_STRING" -->
<!--#include virtual="/somefile.html" -->
<!--#include virtual="/another_existing_file.html" -->
<PRE>
<!--#include virtual="/cgi-bin/printenv?$QUERY_STRING" -->
</PRE>

... printenv will show QUERY_STRING to be an empty string, and
QUERY_STRING_UNESCAPED to be a disturbingly different line of garbage each time.

I'm available to test fixes on my example setup.

William Drury

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org