mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MEDIUM: http: "option checkcache" fails with the no-cache header
The checkcache option checks for cacheable responses with a set-cookie header. Since the response processing code was refactored in 1.3.8 (commit a15645d4), the check was broken because the no-cache value is only checked as no-cache="set-cookie", and not alone. Thanks to Herv Commowick for reporting this stupid bug! The fix should be backported to 1.4 and 1.3.
This commit is contained in:
parent
0fc36e3ae9
commit
5b15f9004d
@ -7870,6 +7870,7 @@ void check_response_for_cacheability(struct session *t, struct channel *rtr)
|
||||
|
||||
/* OK, so we know that either p2 points to the end of string or to a comma */
|
||||
if (((p2 - p1 == 7) && strncasecmp(p1, "private", 7) == 0) ||
|
||||
((p2 - p1 == 8) && strncasecmp(p1, "no-cache", 8) == 0) ||
|
||||
((p2 - p1 == 8) && strncasecmp(p1, "no-store", 8) == 0) ||
|
||||
((p2 - p1 == 9) && strncasecmp(p1, "max-age=0", 9) == 0) ||
|
||||
((p2 - p1 == 10) && strncasecmp(p1, "s-maxage=0", 10) == 0)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user