Repository: trafficserver
Updated Branches:
  refs/heads/6.1.x 41964ab76 -> 19ea44d0d


TS-4106 Allow Cache Inspector to split properly on multiline URLs

Leif: This was broken in commit bd304288b55e989, and the fixes seems
to restore original behavior (while retaining the use of strlcpy() ).

This closes #401

(cherry picked from commit a70e9473cabba89861965d5ab775dbe4f20c720b)


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

Branch: refs/heads/6.1.x
Commit: 19ea44d0db1ae3697f8100909f3b3b84b158c8d8
Parents: 41964ab
Author: Hiroaki Nakamura <[email protected]>
Authored: Fri Jan 1 09:00:19 2016 +0900
Committer: Leif Hedstrom <[email protected]>
Committed: Tue Jan 12 13:47:59 2016 -0800

----------------------------------------------------------------------
 iocore/cache/CachePages.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/19ea44d0/iocore/cache/CachePages.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index b850f0b..f0bec19 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -126,7 +126,7 @@ struct ShowCache : public ShowCont {
           q = strstr(p, "%0D%0A" /* \r\n */); // we used this in the JS to 
separate urls
           if (!q)
             q = t;
-          ink_strlcpy(show_cache_urlstrs[s], p, sizeof(show_cache_urlstrs[s]));
+          ink_strlcpy(show_cache_urlstrs[s], p, q ? q - p + 1: 
sizeof(show_cache_urlstrs[s]));
           p = q + 6; // +6 ==> strlen(%0D%0A)
         }
       }

Reply via email to