You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/03/13 21:34:53 UTC
[trafficserver] branch master updated: #1481 Makes % work
consistently, and at all
This is an automated email from the ASF dual-hosted git repository.
zwoop 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 8e5b9ea #1481 Makes %<cluc> work consistently, and at all
8e5b9ea is described below
commit 8e5b9eab36a0facb7c8f48079f9860e6252e5572
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Mon Mar 13 11:14:24 2017 -0600
#1481 Makes %<cluc> work consistently, and at all
---
proxy/logging/LogAccess.h | 4 ++--
proxy/logging/LogAccessHttp.cc | 13 +++++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/proxy/logging/LogAccess.h b/proxy/logging/LogAccess.h
index 1c0e12d..f1d7243 100644
--- a/proxy/logging/LogAccess.h
+++ b/proxy/logging/LogAccess.h
@@ -276,8 +276,8 @@ public:
inkcoreapi virtual int marshal_process_uuid(char *); // STR
// These two are special, in that they are shared for all log types / implementations
- inkcoreapi int marshal_entry_type(char *); // INT
- inkcoreapi int marshal_cache_lookup_url_canon(char *); // STR
+ inkcoreapi int marshal_entry_type(char *); // INT
+ inkcoreapi virtual int marshal_cache_lookup_url_canon(char *); // STR
// named fields from within a http header
//
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index ecd9213..95a620e 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -71,7 +71,7 @@ LogAccessHttp::LogAccessHttp(HttpSM *sm)
m_proxy_resp_content_type_str(nullptr),
m_proxy_resp_content_type_len(0),
m_cache_lookup_url_canon_str(nullptr),
- m_cache_lookup_url_canon_len(0)
+ m_cache_lookup_url_canon_len(-1)
{
ink_assert(m_http_sm != nullptr);
}
@@ -269,9 +269,14 @@ LogAccessHttp::marshal_cache_lookup_url_canon(char *buf)
int len = INK_MIN_ALIGN;
validate_lookup_url();
- len = round_strlen(m_cache_lookup_url_canon_len + 1); // +1 for eos
- if (buf) {
- marshal_mem(buf, m_cache_lookup_url_canon_str, m_cache_lookup_url_canon_len, len);
+ if (0 >= m_cache_lookup_url_canon_len) {
+ // If the lookup URL isn't populated, we'll fall back to the request URL.
+ len = marshal_client_req_url_canon(buf);
+ } else {
+ len = round_strlen(m_cache_lookup_url_canon_len + 1); // +1 for eos
+ if (buf) {
+ marshal_mem(buf, m_cache_lookup_url_canon_str, m_cache_lookup_url_canon_len, len);
+ }
}
return len;
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].