From: Jeff Trawick Date: Sun, 13 Mar 2016 15:29:38 +0000 (+0000) Subject: mod_include now sets DOCUMENT_ARGS. X-Git-Tag: 2.5.0-alpha~1908 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33931c9953a38b9189536209985bb104072f1327;p=thirdparty%2Fapache%2Fhttpd.git mod_include now sets DOCUMENT_ARGS. * Like DOCUMENT_URI, this is for the SSI document, not for any subrequest called for the include directive. * Like QUERY_STRING, this is just r->args (or empty string if there are none), unlike QUERY_STRING_UNESCAPED. The name of the variable is taken from the Zeus SSI implementation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734817 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1a5cb305cf3..b3e2f2b403d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_include: Add variable DOCUMENT_ARGS, with the arguments to the + request for the SSI document. [Jeff Trawick] + *) core: Extend support for setting aside data from the network input filter to any connection or request input filter. [Graham Leggett] diff --git a/docs/manual/mod/mod_include.xml b/docs/manual/mod/mod_include.xml index 1b8599629dd..e2eb1d93a09 100644 --- a/docs/manual/mod/mod_include.xml +++ b/docs/manual/mod/mod_include.xml @@ -543,10 +543,22 @@ AddOutputFilter INCLUDES .shtml the user.
QUERY_STRING_UNESCAPED
-
If a query string is present, this variable contains the - (%-decoded) query string, which is escaped for shell - usage (special characters like & etc. are - preceded by backslashes).
+
If a query string is present in the request for the active + SSI document, this variable contains the (%-decoded) query + string, which is escaped for shell usage (special + characters like & etc. are preceded by + backslashes). It is not set if a query string is not + present. Use DOCUMENT_ARGS if shell escaping + is not desired.
+ +
DOCUMENT_ARGS
+
This variable contains the query string of the active SSI + document, or the empty string if a query string is not + included. For subrequests invoked through the + include SSI directive, QUERY_STRING + will represent the query string of the subrequest and + DOCUMENT_ARGS will represent the query string of + the SSI document.
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 2e24b0de6c8..e73b762f94b 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -598,6 +598,7 @@ static void add_include_vars(request_rec *r) apr_table_setn(e, "DATE_GMT", LAZY_VALUE); apr_table_setn(e, "LAST_MODIFIED", LAZY_VALUE); apr_table_setn(e, "DOCUMENT_URI", r->uri); + apr_table_setn(e, "DOCUMENT_ARGS", r->args ? r->args : ""); if (r->path_info && *r->path_info) { apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info); }