[MINOR] cookie: add the expired (E) and old (O) flags for request cookies

These flags will indicate the cookie status when an expiration date is
set.
(cherry picked from commit 3f0f0e4583a432d34b75bc7b9dd2c756b4e181a7)
This commit is contained in:
Willy Tarreau 2010-10-07 15:28:23 +02:00
parent 92954fdf2e
commit b761ec4c94
2 changed files with 3 additions and 1 deletions

View File

@ -41,6 +41,8 @@
#define TX_CK_INVALID 0x00000020 /* this session had a cookie which matches no server */ #define TX_CK_INVALID 0x00000020 /* this session had a cookie which matches no server */
#define TX_CK_DOWN 0x00000040 /* this session had cookie matching a down server */ #define TX_CK_DOWN 0x00000040 /* this session had cookie matching a down server */
#define TX_CK_VALID 0x00000060 /* this session had cookie matching a valid server */ #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_MASK 0x000000E0 /* mask to get this session's cookie flags */ #define TX_CK_MASK 0x000000E0 /* mask to get this session's cookie flags */
#define TX_CK_SHIFT 5 /* bit shift */ #define TX_CK_SHIFT 5 /* bit shift */

View File

@ -837,7 +837,7 @@ void http_return_srv_error(struct session *s, struct stream_interface *si)
extern const char sess_term_cond[8]; extern const char sess_term_cond[8];
extern const char sess_fin_state[8]; extern const char sess_fin_state[8];
extern const char *monthname[12]; extern const char *monthname[12];
const char sess_cookie[4] = "NIDV"; /* No cookie, Invalid cookie, cookie for a Down server, Valid cookie */ const char sess_cookie[8] = "NIDVEO67"; /* No cookie, Invalid cookie, cookie for a Down server, Valid cookie, Expired cookie, Old cookie */
const char sess_set_cookie[8] = "N1I3PD5R"; /* No set-cookie, unknown, Set-Cookie Inserted, unknown, const char sess_set_cookie[8] = "N1I3PD5R"; /* No set-cookie, unknown, Set-Cookie Inserted, unknown,
Set-cookie seen and left unchanged (passive), Set-cookie Deleted, Set-cookie seen and left unchanged (passive), Set-cookie Deleted,
unknown, Set-cookie Rewritten */ unknown, Set-cookie Rewritten */