This is an automated email from the ASF dual-hosted git repository.

amc 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  2fc651d   Output the responding url when "Warning: Document 
truncated" occurs for a valid request.
2fc651d is described below

commit 2fc651d8f60a17296d913330c57ad4b8adb28012
Author: tao_627 <[email protected]>
AuthorDate: Tue May 16 18:14:30 2017 +0800

    Output the responding url when "Warning: Document truncated" occurs for a 
valid
    request.
---
 iocore/cache/CacheRead.cc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 215f0a9..b1e4875 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -585,10 +585,17 @@ CacheVC::openReadReadDone(int event, Event *e)
     }
     // fall through for truncated documents
   }
-Lerror:
+Lerror : {
   char tmpstring[100];
-  Warning("Document %s truncated", earliest_key.toHexStr(tmpstring));
+  if (request.valid()) {
+    int url_length;
+    const char *url_text = request.url_get()->string_get_ref(&url_length);
+    Warning("Document %s truncated, url[%.*s]", 
earliest_key.toHexStr(tmpstring), url_length, url_text);
+  } else {
+    Warning("Document %s truncated", earliest_key.toHexStr(tmpstring));
+  }
   return calluser(VC_EVENT_ERROR);
+}
 Ldone:
   return calluser(VC_EVENT_EOS);
 Lcallreturn:

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to