[MINOR] move some flags from session.h to proto_http.h
Some session flags were clearly related to HTTP transactions.
A new 'flags' field has been added to http_txn, and the
associated flags moved to proto_http.h.
diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h
index 297c5b9..298d30d 100644
--- a/include/proto/proto_http.h
+++ b/include/proto/proto_http.h
@@ -82,6 +82,15 @@
int stats_check_uri_auth(struct session *t, struct proxy *backend);
void init_proto_http();
+/* used to clear the cookie flags when a transaction failed on the server
+ * designed by the cookie. We clear the CK_VALID bit and set the CK_DOWN.
+ */
+static inline void http_flush_cookie_flags(struct http_txn *txn)
+{
+ if ((txn->flags & TX_CK_MASK) == TX_CK_VALID)
+ txn->flags ^= (TX_CK_VALID | TX_CK_DOWN);
+}
+
#endif /* _PROTO_PROTO_HTTP_H */
/*