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.
This commit is contained in:
Christopher Faulet 2020-10-06 17:48:05 +02:00
parent 4a8779f808
commit 2afd874704
3 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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))