You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nathan Schrenk <ns...@neog.com> on 1996/02/18 00:38:12 UTC
I think I've tracked down my SSI problem
I went through mod_include.c today looking for why the SSI directive
<!--#echo var="QUERY_STRING_UNESCAPED" --> doesn't work under Apache
1.0.2 (and other previous versions, I'm sure.) It seems that this must
have been broken for a long time, as I don't remember seeing any
significant changes to mod_include.c for quite a while.
Anyway, as far as I can tell, the environment that an echo variable acts
upon is created by add_common_vars() and add_include_vars() which are
called in send_parsed_file(). add_include_vars() does not add
QUERY_STRING, QUERY_STRING_UNESCAPED, or any of the CGI variables.
For some reason, QUERY_STRING and QUERY_STRING_UNESCAPED _are_ added in
include_cmd_child, but this doesn't make these variables available to the
echo directive.
The NCSA SSI doc at http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html
states "A number of variables are made available to parsed documents. In
addition to the CGI variable set, the following variables are made
available:" ...
That indicates that the echo directive is required to have all of the CGI
variables available to it. What do you think the best solution to the
problem is? Should I just duplicate the functionality of add_cgi_vars()
in add_include_vars()? Or perhaps moving add_cgi_vars() out into
util_script.c and calling add_cgi_vars() from mod_include.c is a better
solution?
If I don't hear any better suggestions or criticism of the second
approach, I'm going to submit a patch using that method to fix this
problem. I'm suprised no one has run into this problem before.
Nathan
--
Nathan Schrenk nschrenk@neog.com
Neoglyphics Media Corp. http://www.neog.com/