From 2afd874704647690d7bbb6953d9027fac08d5d89 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 6 Oct 2020 17:48:05 +0200 Subject: [PATCH] CLEANUP: htx: Remove HTX_FL_UPGRADE unsued flag Now the H1 to H2 upgrade is handled before the stream creation. HTX_FL_UPGRADE flag is now unused. --- include/haproxy/htx-t.h | 2 +- include/haproxy/htx.h | 2 +- src/http_ana.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/haproxy/htx-t.h b/include/haproxy/htx-t.h index 9ecc754e4..1b990260f 100644 --- a/include/haproxy/htx-t.h +++ b/include/haproxy/htx-t.h @@ -143,7 +143,7 @@ #define HTX_FL_NONE 0x00000000 #define HTX_FL_PARSING_ERROR 0x00000001 /* Set when a parsing error occurred */ #define HTX_FL_PROCESSING_ERROR 0x00000002 /* Set when a processing error occurred */ -#define HTX_FL_UPGRADE 0x00000004 /* Set when an upgrade is in progress */ +/* 0x00000004 unsused */ #define HTX_FL_PROXY_RESP 0x00000008 /* Set when the response was generated by HAProxy */ #define HTX_FL_EOI 0x00000010 /* Set when end-of-input is reached from the HTX point of view * (at worst, on the EOM block is missing) diff --git a/include/haproxy/htx.h b/include/haproxy/htx.h index c5e75de3a..5c51e5576 100644 --- a/include/haproxy/htx.h +++ b/include/haproxy/htx.h @@ -561,7 +561,7 @@ static inline struct htx *htx_from_buf(struct buffer *buf) static inline void htx_to_buf(struct htx *htx, struct buffer *buf) { if ((htx->head == -1) && - !(htx->flags & (HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR|HTX_FL_UPGRADE))) { + !(htx->flags & (HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR))) { htx_reset(htx); b_set_data(buf, 0); } diff --git a/src/http_ana.c b/src/http_ana.c index a884bbabd..adbfa75a4 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -124,9 +124,6 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit) * a bad request is. */ if (unlikely(htx_is_empty(htx) || htx->first == -1)) { - if (htx->flags & HTX_FL_UPGRADE) - goto failed_keep_alive; - /* 1: have we encountered a read error ? */ if (req->flags & CF_READ_ERROR) { if (!(s->flags & SF_ERR_MASK))