]> granicus.if.org Git - apache/commitdiff
mod_include now sets DOCUMENT_ARGS.
authorJeff Trawick <trawick@apache.org>
Sun, 13 Mar 2016 15:29:38 +0000 (15:29 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 13 Mar 2016 15:29:38 +0000 (15:29 +0000)
* 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

CHANGES
docs/manual/mod/mod_include.xml
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 1a5cb305cf3b299856854d39e234daf7fdeef969..b3e2f2b403d05fb20ae0df44b8dc7c9b6719d971 100644 (file)
--- 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]
 
index 1b8599629dde85ba47b4841d8e2ac8ba3af9c369..e2eb1d93a093834502b7f6a1016d36600b7da56d 100644 (file)
@@ -543,10 +543,22 @@ AddOutputFilter INCLUDES .shtml
       the user.</dd>
 
       <dt><code>QUERY_STRING_UNESCAPED</code></dt>
-      <dd>If a query string is present, this variable contains the
-      (%-decoded) query string, which is <em>escaped</em> for shell
-      usage (special characters like <code>&amp;</code> etc. are
-      preceded by backslashes).</dd>
+      <dd>If a query string is present in the request for the active
+      SSI document, this variable contains the (%-decoded) query
+      string, which is <em>escaped</em> for shell usage (special
+      characters like <code>&amp;</code> etc. are preceded by
+      backslashes).  It is not set if a query string is not
+      present.  Use <code>DOCUMENT_ARGS</code> if shell escaping
+      is not desired.</dd>
+
+      <dt><code>DOCUMENT_ARGS</code></dt>
+      <dd>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
+      <code>include</code> SSI directive, <code>QUERY_STRING</code>
+      will represent the query string of the subrequest and
+      <code>DOCUMENT_ARGS</code> will represent the query string of
+      the SSI document.</dd>
     </dl>
 </section>
 
index 2e24b0de6c8c53609c715963c5393bf49397d032..e73b762f94b869fc1cfc0d8a43f051da6cf9c194 100644 (file)
@@ -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);
     }