trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject trafficserver git commit: TS-4257: Using original scheme and check for not set in log field cqus This closes #512.
Date Tue, 08 Mar 2016 17:44:28 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master a4b37105c -> 06fbcac1e


TS-4257: Using original scheme and check for not set in log field cqus
This closes #512.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/06fbcac1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/06fbcac1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/06fbcac1

Branch: refs/heads/master
Commit: 06fbcac1e5ec273bf3cfdf8dc9968b5852847b39
Parents: a4b3710
Author: Alan M. Carroll <amc@apache.org>
Authored: Sat Mar 5 10:15:06 2016 -0600
Committer: Alan M. Carroll <amc@apache.org>
Committed: Tue Mar 8 11:43:33 2016 -0600

----------------------------------------------------------------------
 proxy/logging/LogAccessHttp.cc | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/06fbcac1/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index c3c24c2..7f9f7e3 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -544,11 +544,19 @@ LogAccessHttp::marshal_client_req_url_path(char *buf)
 int
 LogAccessHttp::marshal_client_req_url_scheme(char *buf)
 {
-  char *str = NULL;
-  int alen = 0;
+  int scheme = m_http_sm->t_state.orig_scheme;
+  const char *str = NULL;
+  int alen;
   int plen = INK_MIN_ALIGN;
 
-  str = (char *)m_client_request->scheme_get(&alen);
+  // If the transaction aborts very early, the scheme may not be set, or so ASAN reports.
+  if (scheme >= 0) {
+    str = hdrtoken_index_to_wks(scheme);
+    alen = hdrtoken_index_to_length(scheme);
+  } else {
+    str = "UNKNOWN";
+    alen = strlen(str);
+  }
 
   // calculate the the padded length only if the actual length
   // is not zero. We don't want the padded length to be zero


Mime
View raw message