[BUG] buffers: remove BF_MAY_CONNECT and fix forwarding issue
It wasn't really wise to separate BF_MAY_CONNECT and BF_MAY_FORWARD,
as it caused trouble in TCP mode because the connection was allowed
but not the forwarding. Remove BF_MAY_CONNECT.
diff --git a/src/client.c b/src/client.c
index 77b1d96..7135d71 100644
--- a/src/client.c
+++ b/src/client.c
@@ -338,7 +338,7 @@
s->req->rlim -= MAXREWRITE;
if (!(s->analysis & AN_REQ_ANY))
- s->req->flags |= BF_MAY_CONNECT; /* don't wait to establish connection */
+ s->req->flags |= BF_MAY_FORWARD; /* don't wait to establish connection */
s->req->rto = s->fe->timeout.client;
s->req->wto = s->be->timeout.server;
diff --git a/src/proto_http.c b/src/proto_http.c
index 552f7e5..1f7f035 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -2992,8 +2992,8 @@
req->l, rep->l);
/* if no analysis remains, it's time to forward the connection */
- if (!(t->analysis & AN_REQ_ANY) && !(req->flags & (BF_MAY_CONNECT|BF_MAY_FORWARD)))
- req->flags |= BF_MAY_CONNECT | BF_MAY_FORWARD;
+ if (!(t->analysis & AN_REQ_ANY) && !(req->flags & BF_MAY_FORWARD))
+ req->flags |= BF_MAY_FORWARD;
/* FIXME: we still have to check for CL_STSHUTR because client_retnclose
* still set this state (and will do until unix sockets are converted).
@@ -3228,7 +3228,7 @@
trace_term(t, TT_HTTP_SRV_1);
return 1;
}
- else if (req->flags & BF_MAY_CONNECT) {
+ else if (req->flags & BF_MAY_FORWARD) {
/* the client allows the server to connect */
if (txn->flags & TX_CLTARPIT) {
/* This connection is being tarpitted. The CLIENT side has