mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 07:12:42 +02:00
MINOR: stream-int/txn: Move buffer for L7 retries in the HTTP transaction
The L7 retries only concerns the stream when a server connection is established. Thus instead of storing the L7 buffer into the stream-interface, it may be moved to the stream. And because it is only available for HTTP streams, it may be moved in the HTTP transaction. Associated flags are also moved into the HTTP transaction.
This commit is contained in:
@@ -71,6 +71,8 @@
|
||||
/* used only for keep-alive purposes, to indicate we're on a second transaction */
|
||||
#define TX_NOT_FIRST 0x00040000 /* the transaction is not the first one */
|
||||
|
||||
#define TX_L7_RETRY 0x000800000 /* The transaction may attempt L7 retries */
|
||||
#define TX_D_L7_RETRY 0x001000000 /* Disable L7 retries on this transaction, even if configured to do it */
|
||||
/*
|
||||
* HTTP message status flags (msg->flags)
|
||||
*/
|
||||
@@ -184,7 +186,7 @@ struct http_txn {
|
||||
/* 1 unused byte here */
|
||||
short status; /* HTTP status from the server, negative if from proxy */
|
||||
struct http_reply *http_reply; /* The HTTP reply to use as reply */
|
||||
|
||||
struct buffer l7_buffer; /* To store the data, in case we have to retry */
|
||||
char cache_hash[20]; /* Store the cache hash */
|
||||
char cache_secondary_hash[HTTP_CACHE_SEC_KEY_LEN]; /* Optional cache secondary key. */
|
||||
char *uri; /* first line if log needed, NULL otherwise */
|
||||
|
||||
@@ -104,8 +104,7 @@ enum {
|
||||
SI_FL_RXBLK_CONN = 0x00100000, /* other side is not connected */
|
||||
SI_FL_RXBLK_ANY = 0x001F0000, /* any of the RXBLK flags above */
|
||||
SI_FL_RX_WAIT_EP = 0x00200000, /* stream-int waits for more data from the end point */
|
||||
SI_FL_L7_RETRY = 0x01000000, /* The stream interface may attempt L7 retries */
|
||||
SI_FL_D_L7_RETRY = 0x02000000, /* Disable L7 retries on this stream interface, even if configured to do it */
|
||||
/* unused: 0x01000000, 0x02000000 */
|
||||
|
||||
SI_FL_ADDR_FROM_SET = 0x04000000, /* source address is set */
|
||||
SI_FL_ADDR_TO_SET = 0x08000000 /* destination address is set */
|
||||
@@ -140,7 +139,6 @@ struct stream_interface {
|
||||
|
||||
unsigned int hcto; /* half-closed timeout (0 = unset) */
|
||||
struct wait_event wait_event; /* We're in a wait list */
|
||||
struct buffer l7_buffer; /* To store the data, in case we have to retry */
|
||||
};
|
||||
|
||||
/* operations available on a stream-interface */
|
||||
|
||||
@@ -116,7 +116,6 @@ static inline int si_init(struct stream_interface *si)
|
||||
si->cs = NULL;
|
||||
si->state = si->prev_state = SI_ST_INI;
|
||||
si->ops = &si_embedded_ops;
|
||||
si->l7_buffer = BUF_NULL;
|
||||
si->wait_event.tasklet = tasklet_new();
|
||||
if (!si->wait_event.tasklet)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user