Klaus Demo nginx / 20139ff
Fixed cache bypass caching of non-cacheable replies (ticket #21). If cache was bypassed with proxy_cache_bypass, cache-controlling headers (Cache-Control, Expires) wasn't considered and response was cached even if it was actually non-cacheable. Patch by John Ferlito. Maxim Dounin 10 years ago
1 changed file(s) with 2 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
682682 return NGX_DECLINED;
683683 }
684684
685 u->cacheable = 1;
686
685687 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) {
686688
687689 case NGX_ERROR:
694696 default: /* NGX_OK */
695697 break;
696698 }
697
698 u->cacheable = 1;
699699
700700 c = r->cache;
701701
21802180 ngx_http_upstream_finalize_request(r, u, 0);
21812181 return;
21822182 }
2183
2184 u->cacheable = 1;
21852183 }
21862184
21872185 break;