From da831fa068a1cc115066d597fc94a3a1bfad0c9d Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 6 Oct 2020 17:58:43 +0200 Subject: [PATCH] CLEANUP: http-ana: Remove TX_WAIT_NEXT_RQ unsued flag This flags is now unused. It was used in REQ_WAIT_HTTP analyser, when a stream was waiting for a request, to set the keep-alive timeout or to avoid to send HTTP errors to client. --- contrib/debug/flags.c | 1 - include/haproxy/http_ana-t.h | 2 +- src/http_ana.c | 6 +----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/debug/flags.c b/contrib/debug/flags.c index a596b1a45..d845e4efe 100644 --- a/contrib/debug/flags.c +++ b/contrib/debug/flags.c @@ -296,7 +296,6 @@ void show_txn_flags(unsigned int f) SHOW_FLAG(f, TX_NOT_FIRST); SHOW_FLAG(f, TX_USE_PX_CONN); - SHOW_FLAG(f, TX_WAIT_NEXT_RQ); SHOW_FLAG(f, TX_CON_WANT_TUN); SHOW_FLAG(f, TX_CACHE_COOK); diff --git a/include/haproxy/http_ana-t.h b/include/haproxy/http_ana-t.h index 5fb8298de..4dce43d47 100644 --- a/include/haproxy/http_ana-t.h +++ b/include/haproxy/http_ana-t.h @@ -64,7 +64,7 @@ #define TX_CON_WANT_TUN 0x00008000 /* Will be a tunnel (CONNECT or 101-Switching-Protocol) */ -#define TX_WAIT_NEXT_RQ 0x00010000 /* waiting for the second request to start, use keep-alive timeout */ +/* unsued 0x00010000 */ #define TX_USE_PX_CONN 0x00020000 /* Use "Proxy-Connection" instead of "Connection" */ diff --git a/src/http_ana.c b/src/http_ana.c index 09dde1954..de99a5d92 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -115,7 +115,6 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit) proxy_inc_fe_req_ctr(sess->listener, sess->fe); /* one more valid request for this FE */ /* kill the pending keep-alive timeout */ - txn->flags &= ~TX_WAIT_NEXT_RQ; req->analyse_exp = TICK_ETERNITY; BUG_ON(htx_get_first_type(htx) != HTX_BLK_REQ_SL); @@ -4425,7 +4424,6 @@ void http_reply_and_close(struct stream *s, short status, struct http_reply *msg end: s->res.wex = tick_add_ifset(now_ms, s->res.wto); - s->txn->flags &= ~TX_WAIT_NEXT_RQ; channel_auto_read(&s->req); channel_abort(&s->req); @@ -4923,9 +4921,7 @@ void http_init_txn(struct stream *s) struct http_txn *txn = s->txn; struct conn_stream *cs = objt_cs(s->si[0].end); - txn->flags = ((cs && cs->flags & CS_FL_NOT_FIRST) - ? (TX_NOT_FIRST|TX_WAIT_NEXT_RQ) - : 0); + txn->flags = ((cs && cs->flags & CS_FL_NOT_FIRST) ? TX_NOT_FIRST : 0); txn->status = -1; txn->http_reply = NULL; write_u32(txn->cache_hash, 0);