]> granicus.if.org Git - apache/commitdiff
allow the undefined echo string to be configured via
authorAndré Malo <nd@apache.org>
Thu, 28 Aug 2003 23:59:58 +0000 (23:59 +0000)
committerAndré Malo <nd@apache.org>
Thu, 28 Aug 2003 23:59:58 +0000 (23:59 +0000)
<!--#config echomsg="..." -->

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

modules/filters/mod_include.c

index 84986c1a68f238b20274774deeb457bfc198be9c..4be60e2524103afc3dead2056873dfef60867b68 100644 (file)
@@ -1906,7 +1906,8 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
 }
 
 /*
- * <!--#config [timefmt="..."] [sizefmt="..."] [errmsg="..."] -->
+ * <!--#config [timefmt="..."] [sizefmt="..."] [errmsg="..."]
+ *             [echomsg="..."] -->
  */
 static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
                                   apr_bucket_brigade *bb)
@@ -1934,7 +1935,6 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
     while (1) {
         char *tag     = NULL;
         char *tag_val = NULL;
-        char *parsed_string;
 
         ap_ssi_get_tag_and_value(ctx, &tag, &tag_val, SSI_VALUE_RAW);
         if (!tag || !tag_val) {
@@ -1945,6 +1945,11 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
             ctx->error_str = ap_ssi_parse_string(ctx, tag_val, NULL, 0,
                                                  SSI_EXPAND_DROP_NAME);
         }
+        else if (!strcmp(tag, "echomsg")) {
+            ctx->intern->undefined_echo =
+                ap_ssi_parse_string(ctx, tag_val, NULL, 0,SSI_EXPAND_DROP_NAME);
+            ctx->intern->undefined_echo_len=strlen(ctx->intern->undefined_echo);
+        }
         else if (!strcmp(tag, "timefmt")) {
             apr_time_t date = r->request_time;
 
@@ -1960,6 +1965,8 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
                            ctx->time_str, 0));
         }
         else if (!strcmp(tag, "sizefmt")) {
+            char *parsed_string;
+
             parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL, 0,
                                                 SSI_EXPAND_DROP_NAME);
             if (!strcmp(parsed_string, "bytes")) {