This happens when a "use-server" rule sets the server instead.
the cookie is consider too OLD and is ignored. The request will be
redispatched just as if there was no cookie.
+ U : a cookie was present but was not used to select the server because
+ some other server selection mechanism was used instead (typically a
+ "use-server" rule).
+
- : does not apply (no cookie set in configuration).
- the last character reports what operations were performed on the persistence
#define TX_CK_VALID 0x00000060 /* this session had cookie matching a valid server */
#define TX_CK_EXPIRED 0x00000080 /* this session had an expired cookie (idle for too long) */
#define TX_CK_OLD 0x000000A0 /* this session had too old a cookie (offered too long ago) */
+#define TX_CK_UNUSED 0x000000C0 /* this session had a cookie but it was not used (eg: use-server was preferred) */
#define TX_CK_MASK 0x000000E0 /* mask to get this session's cookie flags */
#define TX_CK_SHIFT 5 /* bit shift */
extern fd_set url_encode_map[];
-const char sess_cookie[8] = "NIDVEO67"; /* No cookie, Invalid cookie, cookie for a Down server, Valid cookie, Expired cookie, Old cookie, unknown */
+const char sess_cookie[8] = "NIDVEOU7"; /* No cookie, Invalid cookie, cookie for a Down server, Valid cookie, Expired cookie, Old cookie, Unused, unknown */
const char sess_set_cookie[8] = "NPDIRU67"; /* No set-cookie, Set-cookie found and left unchanged (passive),
Set-cookie Deleted, Set-Cookie Inserted, Set-cookie Rewritten,
Set-cookie Updated, unknown, unknown */
}
if (!srv && !(txn->flags & (TX_CK_DOWN|TX_CK_EXPIRED|TX_CK_OLD))) {
- /* no server matched this cookie */
+ /* no server matched this cookie or we deliberately skipped it */
txn->flags &= ~TX_CK_MASK;
- txn->flags |= TX_CK_INVALID;
+ if ((t->flags & (SN_IGNORE_PRST | SN_ASSIGNED)))
+ txn->flags |= TX_CK_UNUSED;
+ else
+ txn->flags |= TX_CK_INVALID;
}
/* depending on the cookie mode, we may have to either :