From: Martin Mares Date: Mon, 17 Jun 2013 19:49:35 +0000 (+0200) Subject: "X-Cache: HIT" works even without trailing spaces X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=901916394c0e60651b61011205c94a21184c5bd5;p=netgrind.git "X-Cache: HIT" works even without trailing spaces --- 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] = '?';