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

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new e5459ff  Fix debug output for global_user_agent_header.
e5459ff is described below

commit e5459ff2971fe838e119fd81d6f35bc4b2aacfc5
Author: Alan M. Carroll <[email protected]>
AuthorDate: Tue Sep 24 09:10:37 2019 -0500

    Fix debug output for global_user_agent_header.
    
    (cherry picked from commit 71fc9d3c016910f0361997e96d944ffa07734ab0)
---
 proxy/http/HttpTransactHeaders.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxy/http/HttpTransactHeaders.cc 
b/proxy/http/HttpTransactHeaders.cc
index f3c9b5b..ec5215a 100644
--- a/proxy/http/HttpTransactHeaders.cc
+++ b/proxy/http/HttpTransactHeaders.cc
@@ -966,7 +966,8 @@ 
HttpTransactHeaders::add_global_user_agent_header_to_request(OverridableHttpConf
   if (http_txn_conf->global_user_agent_header) {
     MIMEField *ua_field;
 
-    Debug("http_trans", "Adding User-Agent: %s", 
http_txn_conf->global_user_agent_header);
+    Debug("http_trans", "Adding User-Agent: %.*s", 
static_cast<int>(http_txn_conf->global_user_agent_header_size),
+          http_txn_conf->global_user_agent_header);
     if ((ua_field = header->field_find(MIME_FIELD_USER_AGENT, 
MIME_LEN_USER_AGENT)) == nullptr) {
       if (likely((ua_field = header->field_create(MIME_FIELD_USER_AGENT, 
MIME_LEN_USER_AGENT)) != nullptr)) {
         header->field_attach(ua_field);

Reply via email to