]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: htx: Remove HTX_FL_UPGRADE unsued flag
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 6 Oct 2020 15:48:05 +0000 (17:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2020 13:41:49 +0000 (14:41 +0100)
Now the H1 to H2 upgrade is handled before the stream
creation. HTX_FL_UPGRADE flag is now unused.

include/haproxy/htx-t.h
include/haproxy/htx.h
src/http_ana.c

index 9ecc754e4ae3d62f06a475e70bd1e831b8506522..1b990260f50ee1570d20107533d257458eedf848 100644 (file)
 #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)
index c5e75de3a0a3ed2581bffc8e032c344d6c50dd56..5c51e5576e7db54e2d3b805e524ca6a3d05a5461 100644 (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);
        }
index a884bbabda54296c86d43ec3af5c82113ddfc0c4..adbfa75a4e93ffa8630874c5a2856a09cc10d7a4 100644 (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))