trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [trafficserver] branch master updated: Add debug diagnostics for the final cache key string
Date Tue, 13 Feb 2018 17:45:01 GMT
This is an automated email from the ASF dual-hosted git repository.

paziz 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 13734be  Add debug diagnostics for the final cache key string
13734be is described below

commit 13734be267b5dddea439664163c7f59c2e915653
Author: Persia Aziz <persia@yahoo-inc.com>
AuthorDate: Mon Dec 4 11:49:49 2017 -0600

    Add debug diagnostics for the final cache key string
---
 proxy/hdrs/URL.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/proxy/hdrs/URL.cc b/proxy/hdrs/URL.cc
index e44cb7f..352a557 100644
--- a/proxy/hdrs/URL.cc
+++ b/proxy/hdrs/URL.cc
@@ -1740,14 +1740,16 @@ url_CryptoHash_get_general(const URLImpl *url, CryptoContext &ctx,
CryptoHash &h
   if (p != buffer) {
     ctx.update(buffer, p - buffer);
   }
-
-  port = url_canonicalize_port(url->m_url_type, url->m_port);
+  int buffer_len = static_cast<int>(p - buffer);
+  port           = url_canonicalize_port(url->m_url_type, url->m_port);
 
   ctx.update(&port, sizeof(port));
   if (generation != -1) {
     ctx.update(&generation, sizeof(generation));
+    Debug("url_cachekey", "Final url string for cache hash key %.*s%d%d", buffer_len, buffer,
port, static_cast<int>(generation));
+  } else {
+    Debug("url_cachekey", "Final url string for cache hash key %.*s%d", buffer_len, buffer,
port);
   }
-
   ctx.finalize(hash);
 }
 

-- 
To stop receiving notification emails like this one, please contact
paziz@apache.org.

Mime
View raw message