]> mj.ucw.cz Git - netgrind.git/commitdiff
Let the caching flags mention conditional requests
authorMartin Mares <mj@ucw.cz>
Mon, 17 Jun 2013 19:52:15 +0000 (21:52 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 17 Jun 2013 19:52:15 +0000 (21:52 +0200)
README
netgrind/http.c

diff --git a/README b/README
index 71a02ddc471b172dfde3fcda69fad85e6def8221..5de268351a062ff70c1dc46817a5f90af9b7f64d 100644 (file)
--- a/README
+++ b/README
@@ -69,8 +69,9 @@ transaction ID
 Cache status codes:
 
        1st char: request cacheing control      . = none
-                                               N = don't cache
+       (first matching letter used)            N = don't cache
                                                R = revalidate
+                                               c = conditional request (If-Modified-Since, If-Match)
 
        2nd char: response cacheability         . = not restricted
        (first matching letter used)            N = don't cache
index e9ca9c95ae5a20270fb345d21f5523a6bb6150d3..0a221c651efffd6b7d9156478a2d664fc35ed5b0 100644 (file)
@@ -368,6 +368,8 @@ static void http_cache_report(struct http_state *s, char *buf)
     buf[0] = 'N';
   else if (find_token(rq_cc, "max-age=0") || find_token(rq_cc, "must-revalidate"))
     buf[0] = 'R';
+  else if (http_lookup_hdr(&s->req_headers, "If-Match:") || http_lookup_hdr(&s->req_headers, "If-Modified-Since:"))
+    buf[0] = 'c';
   else
     buf[0] = '.';