trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [46/50] git commit: TS-1628 in validate_unmapped_url(), t_state.pristine_url maybe invalid().
Date Sat, 09 Mar 2013 00:48:36 GMT
TS-1628 in validate_unmapped_url(), t_state.pristine_url maybe invalid().


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

Branch: refs/heads/3.3.x
Commit: b30e6982f777269351078d81b08baaf3d70f2271
Parents: 666fdbe
Author: Bin Chen <kuotai@taobao.com>
Authored: Fri Mar 8 10:02:04 2013 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Fri Mar 8 10:02:04 2013 -0700

----------------------------------------------------------------------
 proxy/logging/LogAccessHttp.cc |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b30e6982/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index d198df9..cd945f6 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -180,12 +180,14 @@ void
 LogAccessHttp::validate_unmapped_url(void)
 {
   if (m_client_req_unmapped_url_canon_len < 0) {
-    int unmapped_url_len;
-    char *unmapped_url = m_http_sm->t_state.pristine_url.string_get_ref(&unmapped_url_len);
+    if (m_http_sm->t_state.pristine_url.valid()) {
+      int unmapped_url_len;
+      char *unmapped_url = m_http_sm->t_state.pristine_url.string_get_ref(&unmapped_url_len);
 
-    if (unmapped_url && unmapped_url[0] != 0) {
-      m_client_req_unmapped_url_canon_str =
+      if (unmapped_url && unmapped_url[0] != 0) {
+        m_client_req_unmapped_url_canon_str =
         LogUtils::escapify_url(&m_arena, unmapped_url, unmapped_url_len, &m_client_req_unmapped_url_canon_len);
+      }
     } else {
       m_client_req_unmapped_url_canon_len = 0;
     }


Mime
View raw message