This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 42bdd30 Duplicate pqsn logic in shn
42bdd30 is described below
commit 42bdd3078d6ec7fa05f1b674cccdcc109bbbc0a5
Author: dyrock <[email protected]>
AuthorDate: Tue Jun 19 16:58:24 2018 +0000
Duplicate pqsn logic in shn
(cherry picked from commit c8053415f9387f93222a0fc62bb0ea200b0c06c8)
---
proxy/logging/LogAccessHttp.cc | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index 404f65b..ccf097b 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -1126,21 +1126,18 @@ LogAccessHttp::marshal_server_host_ip(char *buf)
int
LogAccessHttp::marshal_server_host_name(char *buf)
{
- const char *str = nullptr;
- int padded_len = INK_MIN_ALIGN;
- int actual_len = 0;
-
- if (m_client_request) {
- str = m_client_request->host_get(&actual_len);
+ char *str = nullptr;
+ int len = INK_MIN_ALIGN;
- if (str) {
- padded_len = round_strlen(actual_len + 1); // +1 for trailing 0
- }
+ if (m_http_sm->t_state.current.server) {
+ str = m_http_sm->t_state.current.server->name;
+ len = LogAccess::strlen(str);
}
+
if (buf) {
- marshal_mem(buf, str, actual_len, padded_len);
+ marshal_str(buf, str, len);
}
- return padded_len;
+ return len;
}
/*-------------------------------------------------------------------------