mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 01:14:38 +00:00
BUG/MINOR: cache: Inverted variables in http_calc_maxage function
The maxage and smaxage variables were inadvertently assigned the Cache-Control s-maxage and max-age values respectively when it should have been the other way around. This can be backported on all branches after 1.8 (included).
This commit is contained in:
parent
40ed97b04b
commit
8c2db71326
@ -495,7 +495,7 @@ int http_calc_maxage(struct stream *s, struct cache *cache)
|
||||
|
||||
chunk_strncat(chk, value, ctx.value.len - 8 + 1);
|
||||
chunk_strncat(chk, "", 1);
|
||||
maxage = atoi(chk->area);
|
||||
smaxage = atoi(chk->area);
|
||||
}
|
||||
|
||||
value = directive_value(ctx.value.ptr, ctx.value.len, "max-age", 7);
|
||||
@ -504,7 +504,7 @@ int http_calc_maxage(struct stream *s, struct cache *cache)
|
||||
|
||||
chunk_strncat(chk, value, ctx.value.len - 7 + 1);
|
||||
chunk_strncat(chk, "", 1);
|
||||
smaxage = atoi(chk->area);
|
||||
maxage = atoi(chk->area);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user