]> mj.ucw.cz Git - netgrind.git/commitdiff
"X-Cache: HIT" works even without trailing spaces
authorMartin Mares <mj@ucw.cz>
Mon, 17 Jun 2013 19:49:35 +0000 (21:49 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 17 Jun 2013 19:49:35 +0000 (21:49 +0200)
netgrind/http.c

index d65672cd643354943e304bbdbb4f4007217c85f7..e9ca9c95ae5a20270fb345d21f5523a6bb6150d3 100644 (file)
@@ -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] = '?';