]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cache: Use the <kip> value to check too big objects
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 18 Sep 2025 07:04:02 +0000 (09:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Oct 2025 09:10:42 +0000 (11:10 +0200)
When an object should be cache, to check if it is too big or not, the
<kip> value is now used instead of the HTX extra field.

src/cache.c

index 0854b86e3ca090fc479466096b2e31efde8efa5f..9f83c9da5d2ecd6564073b87742ea6c423c8d7a5 100644 (file)
@@ -1270,7 +1270,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
 
        /* Do not cache too big objects. */
        if ((msg->flags & HTTP_MSGF_CNT_LEN) && shctx->max_obj_size > 0 &&
-           htx->data + htx->extra > shctx->max_obj_size)
+           s->scb->sedesc->kip > shctx->max_obj_size)
                goto out;
 
        /* Only a subset of headers are supported in our Vary implementation. If