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 2016/01/12 22:47:23 UTC

trafficserver git commit: TS-4106 Allow Cache Inspector to split properly on multiline URLs

Repository: trafficserver
Updated Branches:
  refs/heads/master c26952d95 -> a70e9473c


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


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

Branch: refs/heads/master
Commit: a70e9473cabba89861965d5ab775dbe4f20c720b
Parents: c26952d
Author: Hiroaki Nakamura <hn...@gmail.com>
Authored: Fri Jan 1 09:00:19 2016 +0900
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Jan 12 13:46:50 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a70e9473/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)
         }
       }