ap_http_header_filter: avoid double encoding of output headers in traces.
authorYann Ylavic <ylavic@apache.org>
Mon, 16 Sep 2019 11:46:27 +0000 (11:46 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 16 Sep 2019 11:46:27 +0000 (11:46 +0000)
When output headers are logged (TRACE4) in send_all_header_fields(), we don't
need to explicitely ap_escape_logitem() them since ap_log_rerror() takes care
of log files escaping already.

Otherwise, characters like '"' are unncesseralily encoded, and '\\' is doubly
encoded (including for controls).

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

modules/http/http_filters.c

index 26440e2..327d902 100644 (file)
@@ -898,8 +898,7 @@ static apr_status_t send_all_header_fields(header_struct *h,
         t_elt = (const apr_table_entry_t *)(elts->elts);
         do {
             ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "  %s: %s",
-                          ap_escape_logitem(r->pool, t_elt->key),
-                          ap_escape_logitem(r->pool, t_elt->val));
+                          t_elt->key, t_elt->val);
             t_elt++;
         } while (t_elt < t_end);
     }