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 2013/10/17 19:39:10 UTC
[1/2] git commit: TS-1988 cquuc and cquup can have no values
Updated Branches:
refs/heads/master 275e254fc -> 36db28de2
TS-1988 cquuc and cquup can have no values
When there is no remap phase, the unmapped URL does not get
populated. This means that cquuc and cquup can have no value,
so a "-" is logged. This happens, for example, with server
intercept plugins that do not pass through a remap phase.
This patch falls back on the original client URL in these
situations.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/25598f2e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/25598f2e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/25598f2e
Branch: refs/heads/master
Commit: 25598f2e8e8bef8e60ab42e65143fc553f53c1f8
Parents: 275e254
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu Oct 10 15:49:40 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Oct 17 11:38:00 2013 -0600
----------------------------------------------------------------------
proxy/logging/LogAccessHttp.cc | 41 ++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/25598f2e/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index 7e72399..b2bfb58 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -313,13 +313,19 @@ LogAccessHttp::marshal_client_req_url_canon(char *buf)
int
LogAccessHttp::marshal_client_req_unmapped_url_canon(char *buf)
{
-
- validate_unmapped_url();
-
- int len = round_strlen(m_client_req_unmapped_url_canon_len + 1); // +1 for eos
+ int len = INK_MIN_ALIGN;
if (buf) {
- marshal_mem(buf, m_client_req_unmapped_url_canon_str, m_client_req_unmapped_url_canon_len, len);
+ validate_unmapped_url();
+ if (0 == m_client_req_unmapped_url_canon_len) {
+ // If the unmapped URL isn't populated, we'll fall back to the original
+ // client URL. This helps for example server intercepts to continue to
+ // log the requests, even when there is no remap rule for it.
+ len = marshal_client_req_url_canon(buf);
+ } else {
+ len = round_strlen(m_client_req_unmapped_url_canon_len + 1); // +1 for eos
+ marshal_mem(buf, m_client_req_unmapped_url_canon_str, m_client_req_unmapped_url_canon_len, len);
+ }
}
return len;
}
@@ -330,15 +336,17 @@ LogAccessHttp::marshal_client_req_unmapped_url_canon(char *buf)
int
LogAccessHttp::marshal_client_req_unmapped_url_path(char *buf)
{
- int len;
-
- validate_unmapped_url();
-
- validate_unmapped_url_path();
+ int len = INK_MIN_ALIGN;
- len = round_strlen(m_client_req_unmapped_url_path_len + 1); // +1 for eos
if (buf) {
- marshal_mem(buf, m_client_req_unmapped_url_path_str, m_client_req_unmapped_url_path_len, len);
+ validate_unmapped_url();
+ validate_unmapped_url_path();
+ if (0 == m_client_req_unmapped_url_path_len) {
+ len = marshal_client_req_url_path(buf);
+ } else {
+ len = round_strlen(m_client_req_unmapped_url_path_len + 1); // +1 for eos
+ marshal_mem(buf, m_client_req_unmapped_url_path_str, m_client_req_unmapped_url_path_len, len);
+ }
}
return len;
}
@@ -349,12 +357,13 @@ LogAccessHttp::marshal_client_req_unmapped_url_path(char *buf)
int
LogAccessHttp::marshal_client_req_unmapped_url_host(char *buf)
{
- validate_unmapped_url();
- validate_unmapped_url_path();
-
- int len = round_strlen(m_client_req_unmapped_url_host_len + 1); // +1 for eos
+ int len = INK_MIN_ALIGN;
if (buf) {
+ validate_unmapped_url();
+ validate_unmapped_url_path();
+
+ len = round_strlen(m_client_req_unmapped_url_host_len + 1); // +1 for eos
marshal_mem(buf, m_client_req_unmapped_url_host_str, m_client_req_unmapped_url_host_len, len);
}
return len;
[2/2] git commit: Added TS-1988
Posted by zw...@apache.org.
Added TS-1988
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/36db28de
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/36db28de
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/36db28de
Branch: refs/heads/master
Commit: 36db28de2423a31edb29cf08f8c2a2528298f654
Parents: 25598f2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu Oct 17 11:39:02 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Oct 17 11:39:02 2013 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/36db28de/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 111c913..c9695ee 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-1988] cquuc and cquup log tags can have no values.
+
*) [TS-2159] Force first log rotation at proxy.config.log.rolling_size_mb
*) [TS-2138] Fix the bug that restarting ats cause cache data loss if