Klaus Demo nginx / 402b2f0
do not cache response if it has "no-store" or "private" in "Cache-Control" header Igor Sysoev 12 years ago
1 changed file(s) with 7 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
30223022 return NGX_OK;
30233023 }
30243024
3025 last = h->value.data + h->value.len;
3026
3027 if (ngx_strlcasestrn(h->value.data, last, (u_char *) "no-cache", 8 - 1)
3028 != NULL)
3025 p = h->value.data;
3026 last = p + h->value.len;
3027
3028 if (ngx_strlcasestrn(p, last, (u_char *) "no-cache", 8 - 1) != NULL
3029 || ngx_strlcasestrn(p, last, (u_char *) "no-store", 8 - 1) != NULL
3030 || ngx_strlcasestrn(p, last, (u_char *) "private", 7 - 1) != NULL)
30293031 {
30303032 u->cacheable = 0;
30313033 return NGX_OK;
30323034 }
30333035
3034 p = ngx_strlcasestrn(h->value.data, last, (u_char *) "max-age=", 8 - 1);
3036 p = ngx_strlcasestrn(p, last, (u_char *) "max-age=", 8 - 1);
30353037
30363038 if (p == NULL) {
30373039 return NGX_OK;