]> granicus.if.org Git - apache/commitdiff
Allow variable expansion within in the "var" arg to <!--#echo
authorBrian Pane <brianp@apache.org>
Fri, 29 Mar 2002 05:58:39 +0000 (05:58 +0000)
committerBrian Pane <brianp@apache.org>
Fri, 29 Mar 2002 05:58:39 +0000 (05:58 +0000)
and <!--#set, so that people can do things like this:
  <!--#echo var="${foo}_${bar}" -->

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94294 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index d038ce1613dd9b364798275bbd4da9ffdb3473a8..c36bca0c998c358c93c660cded2fba6c609b849d 100644 (file)
@@ -1358,7 +1358,10 @@ static int handle_echo(include_ctx_t *ctx, apr_bucket_brigade **bb,
                 }
             }
             if (!strcmp(tag, "var")) {
-                const char *val = get_include_var(r, ctx, tag_val);
+                const char *val =
+                    get_include_var(r, ctx,
+                                    ap_ssi_parse_string(r, ctx, tag_val, NULL,
+                                                        MAX_STRING_LEN, 0));
                 if (val) {
                     switch(encode) {
                     case E_NONE:   
@@ -2784,7 +2787,8 @@ static int handle_set(include_ctx_t *ctx, apr_bucket_brigade **bb,
                 return 1;
             }
             else if (!strcmp(tag, "var")) {
-                var = tag_val;
+                var = ap_ssi_parse_string(r, ctx, tag_val, NULL,
+                                          MAX_STRING_LEN, 0);
             }
             else if (!strcmp(tag, "value")) {
                 if (var == (char *) NULL) {