]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream: remove SF_TUNNEL, SF_INITIALIZED, SF_CONN_TAR
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 17:01:38 +0000 (18:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 17:01:38 +0000 (18:01 +0100)
These flags haven't been used for a while. SF_TUNNEL was reintroduced
by commit d62b98c6e ("MINOR: stream: don't set backend's nor response
analysers on SF_TUNNEL") to handle the two-level streams needed to
deal with the first model for H2, and was not removed after this model
was abandonned. SF_INITIALIZED was only set. SF_CONN_TAR was never
referenced at all.

contrib/debug/flags.c
include/types/stream.h
src/stream.c

index f8a4d03ee8d8973e6e70e6a1a142d6c51a99a020..6c57143b94a3c6e0fe184db8ed3272264f98f5c0 100644 (file)
@@ -360,11 +360,8 @@ void show_strm_flags(unsigned int f)
        case SF_ERR_CHK_PORT: f &= ~SF_ERR_MASK ; printf("SF_ERR_CHK_PORT%s",       f ? " | " : ""); break;
        }
 
-       SHOW_FLAG(f, SF_TUNNEL);
        SHOW_FLAG(f, SF_REDIRECTABLE);
-       SHOW_FLAG(f, SF_CONN_TAR);
        SHOW_FLAG(f, SF_REDISP);
-       SHOW_FLAG(f, SF_INITIALIZED);
        SHOW_FLAG(f, SF_CURR_SESS);
        SHOW_FLAG(f, SF_MONITOR);
        SHOW_FLAG(f, SF_FORCE_PRST);
index 6dee43214462a95a860434a6944ee4868adc4679..8cee760d9e39ba4da600aaab80f87930d18418e1 100644 (file)
 #define SF_FORCE_PRST  0x00000010      /* force persistence here, even if server is down */
 #define SF_MONITOR     0x00000020      /* this stream comes from a monitoring system */
 #define SF_CURR_SESS   0x00000040      /* a connection is currently being counted on the server */
-#define SF_INITIALIZED 0x00000080      /* the stream was fully initialized */
+/* unused: 0x00000080 */
 #define SF_REDISP      0x00000100      /* set if this stream was redispatched from one server to another */
-#define SF_CONN_TAR    0x00000200      /* set if this stream is turning around before reconnecting */
+/* unused: 0x00000200 */
 #define SF_REDIRECTABLE        0x00000400      /* set if this stream is redirectable (GET or HEAD) */
-#define SF_TUNNEL      0x00000800      /* tunnel-mode stream, nothing to catch after data */
+/* unused: 0x00000800 */
 
 /* stream termination conditions, bits values 0x1000 to 0x7000 (0-9 shift 12) */
 #define SF_ERR_NONE     0x00000000     /* normal end of request */
index 7add3dcc954e65c2c204bf27540787763d5e8b73..2e8d75562e7175069c8d100a1b63e4fb87740a8a 100644 (file)
@@ -199,7 +199,6 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
        s->buffer_wait.target = s;
        s->buffer_wait.wakeup_cb = stream_buf_available;
 
-       s->flags |= SF_INITIALIZED;
        s->pcli_next_pid = 0;
        s->pcli_flags = 0;
        s->unique_id = NULL;
@@ -859,14 +858,12 @@ static void sess_establish(struct stream *s)
                rep->flags |= CF_READ_DONTWAIT; /* a single read is enough to get response headers */
        }
 
-       if (!(s->flags & SF_TUNNEL)) {
-               rep->analysers |= strm_fe(s)->fe_rsp_ana | s->be->be_rsp_ana;
+       rep->analysers |= strm_fe(s)->fe_rsp_ana | s->be->be_rsp_ana;
 
-               /* Be sure to filter response headers if the backend is an HTTP proxy
-                * and if there are filters attached to the stream. */
-               if (s->be->mode == PR_MODE_HTTP && HAS_FILTERS(s))
-                       rep->analysers |= AN_RES_FLT_HTTP_HDRS;
-       }
+       /* Be sure to filter response headers if the backend is an HTTP proxy
+        * and if there are filters attached to the stream. */
+       if (s->be->mode == PR_MODE_HTTP && HAS_FILTERS(s))
+               rep->analysers |= AN_RES_FLT_HTTP_HDRS;
 
        si_rx_endp_more(si);
        rep->flags |= CF_READ_ATTACHED; /* producer is now attached */