You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by dm...@apache.org on 2022/06/27 13:21:02 UTC

[trafficserver] branch master updated: Remove unnecessary use of a memory arena when logging. (#8925)

This is an automated email from the ASF dual-hosted git repository.

dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 72f2661b6 Remove unnecessary use of a memory arena when logging. (#8925)
72f2661b6 is described below

commit 72f2661b6082bf99a381a48155f893a19271da76
Author: Damian Meden <da...@gmail.com>
AuthorDate: Mon Jun 27 14:20:56 2022 +0100

    Remove unnecessary use of a memory arena when logging. (#8925)
    
    Co-authored-by: Damian Meden <dm...@apache.org>
---
 proxy/http2/HPACK.cc | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/proxy/http2/HPACK.cc b/proxy/http2/HPACK.cc
index 75c5d3b5a..00103a81e 100644
--- a/proxy/http2/HPACK.cc
+++ b/proxy/http2/HPACK.cc
@@ -677,9 +677,7 @@ decode_indexed_header_field(MIMEFieldWrapper &header, const uint8_t *buf_start,
     int decoded_value_len;
     const char *decoded_value = header.value_get(&decoded_value_len);
 
-    Arena arena;
-    Debug("hpack_decode", "Decoded field: %s: %s", arena.str_store(decoded_name, decoded_name_len),
-          arena.str_store(decoded_value, decoded_value_len));
+    Debug("hpack_decode", "Decoded field: %.*s: %.*s", decoded_name_len, decoded_name, decoded_value_len, decoded_value);
   }
 
   return len;
@@ -770,8 +768,7 @@ decode_literal_header_field(MIMEFieldWrapper &header, const uint8_t *buf_start,
     int decoded_value_len;
     const char *decoded_value = header.value_get(&decoded_value_len);
 
-    Debug("hpack_decode", "Decoded field: %s: %s", arena.str_store(decoded_name, decoded_name_len),
-          arena.str_store(decoded_value, decoded_value_len));
+    Debug("hpack_decode", "Decoded field: %.*s: %.*s", decoded_name_len, decoded_name, decoded_value_len, decoded_value);
   }
 
   if (has_http2_violation) {