summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2017-01-24 17:09:47 +0000
committerEric Covener <covener@apache.org>2017-01-24 17:09:47 +0000
commitfe3c9b7a0f2261688946b4b36915e8f8fe9b7428 (patch)
treef498a786f07eb2b975ef9331a2a5cdd01706818e
parenta697cb95beea9fa847c6f8ba413fc114bdffc479 (diff)
downloadhttpd-fe3c9b7a0f2261688946b4b36915e8f8fe9b7428.tar.gz
Fix %{DOCUMENT_URI} in SSI w/ default parser
*) core: %{DOCUMENT_URI} used in nested SSI expressions should point to the URI originally requsted by the user, not the nested documents URI. This restores the behavior of this variable to match the "legacy" SSI parser. PR60624. Submitted By [Hank Ibell <hwibell gmail.com>] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780095 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--server/util_expr_eval.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index f192b9cb28..f462268c13 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) core: %{DOCUMENT_URI} used in nested SSI expressions should point to the
+ URI originally requsted by the user, not the nested documents URI. This
+ restores the behavior of this variable to match the "legacy" SSI parser.
+ PR60624. [Hank Ibell <hwibell gmail.com>]
+
*) mod_proxy_hcheck: Don't validate timed out responses. [Yann Ylavic]
*) mod_proxy_hcheck: Ensure thread-safety when concurrent healthchecks are
diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c
index e08c4d2ac1..9f3640481d 100644
--- a/server/util_expr_eval.c
+++ b/server/util_expr_eval.c
@@ -1525,7 +1525,10 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
return result;
}
case 23:
- return r->uri;
+ {
+ const char *uri = apr_table_get(r->subprocess_env, "DOCUMENT_URI");
+ return uri ? uri : r->uri;
+ }
case 24:
{
apr_time_exp_t tm;