From 901916394c0e60651b61011205c94a21184c5bd5 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 17 Jun 2013 21:49:35 +0200 Subject: [PATCH] "X-Cache: HIT" works even without trailing spaces --- netgrind/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netgrind/http.c b/netgrind/http.c index d65672c..e9ca9c9 100644 --- a/netgrind/http.c +++ b/netgrind/http.c @@ -433,9 +433,9 @@ static void http_cache_report(struct http_state *s, char *buf) // Is there cache status in reply? if (!rp_cache) buf[3] = '.'; - else if (!strncmp(rp_cache, "HIT ", 4)) + else if (!strncmp(rp_cache, "HIT", 3)) buf[3] = '+'; - else if (!strncmp(rp_cache, "MISS ", 5)) + else if (!strncmp(rp_cache, "MISS", 4)) buf[3] = '-'; else buf[3] = '?'; -- 2.39.2