From: Christopher Faulet Date: Wed, 21 Oct 2026 09:04:27 +0000 (+0000) Subject: MINOR: http-ana: add a transaction flag for requests forbidding storage X-Git-Url: https://git.kaiwu.me/http/%22../$%7BGITURL%7D/static/gitweb.js?a=commitdiff_plain;h=433c7916358bdcec81f8936b0c244aaf73af410f;p=haproxy.git MINOR: http-ana: add a transaction flag for requests forbidding storage The new TX_CACHE_NOSTORE flag will be set on transactions whose request carries a "Cache-Control: no-store" directive, which forbids caches from storing the response (RFC 9111#5.2.1.5). It is needed by the next fix, since the request's directives are not available anymore when the response is checked. The flag is also reported by the flags decoding helper. This patch is needed by the next fix which may be backported. --- diff --git a/include/haproxy/http_ana-t.h b/include/haproxy/http_ana-t.h index 56b9e5b83..4d161debb 100644 --- a/include/haproxy/http_ana-t.h +++ b/include/haproxy/http_ana-t.h @@ -76,6 +76,8 @@ #define TX_L7_RETRY 0x00080000 /* The transaction may attempt L7 retries */ #define TX_D_L7_RETRY 0x00100000 /* Disable L7 retries on this transaction, even if configured to do it */ +#define TX_CACHE_NOSTORE 0x00200000 /* the request forbids caches to store the response */ + /* This function is used to report flags in debugging tools. Please reflect * below any single-bit flag addition above in the same order via the * __APPEND_FLAG and __APPEND_ENUM macros. The new end of the buffer is @@ -90,7 +92,7 @@ static forceinline char *txn_show_flags(char *buf, size_t len, const char *delim /* flags & enums */ _(TX_SCK_PRESENT, _(TX_CACHEABLE, _(TX_CACHE_COOK, _(TX_CACHE_IGNORE, _(TX_CON_WANT_TUN, _(TX_CACHE_HAS_SEC_KEY, _(TX_USE_PX_CONN, - _(TX_NOT_FIRST, _(TX_L7_RETRY, _(TX_D_L7_RETRY)))))))))); + _(TX_NOT_FIRST, _(TX_L7_RETRY, _(TX_D_L7_RETRY, _(TX_CACHE_NOSTORE))))))))))); _e(TX_SCK_MASK, TX_SCK_FOUND, _e(TX_SCK_MASK, TX_SCK_DELETED, _e(TX_SCK_MASK, TX_SCK_INSERTED, _e(TX_SCK_MASK, TX_SCK_REPLACED,