]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] frontend: rely on the frontend and not the backend for INDEPSTR
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Jun 2010 08:56:34 +0000 (10:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 08:53:17 +0000 (10:53 +0200)
Till now, the frontend relied on the backend's options for INDEPSTR,
while at the time of accept, the frontend and backend are the same.
So we now use the frontend's pointer instead of the backend and we
don't have any dependency on the backend anymore in the frontend's
accept code.

src/dumpstats.c
src/frontend.c
src/proto_http.c

index dee7aa4a0ea1045fc7742abc5d0526db2457664d..949fe2b006cc7885bb35fb174fd37eda67805753 100644 (file)
@@ -136,7 +136,7 @@ int stats_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
        s->si[1].exp = TICK_ETERNITY;
        s->si[1].fd = -1; /* just to help with debugging */
        s->si[1].flags = SI_FL_NONE;
-       if (s->be->options2 & PR_O2_INDEPSTR)
+       if (s->fe->options2 & PR_O2_INDEPSTR)
                s->si[1].flags |= SI_FL_INDEP_STR;
 
        stream_int_register_handler(&s->si[1], stats_io_handler);
index e2f24ad7fec99e58a0798f7a77af5cb111035d15..fc40929f459b03af271e7ab65fd8d61137c83c07 100644 (file)
@@ -152,7 +152,7 @@ int frontend_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
        s->si[1].fd = -1; /* just to help with debugging */
 
        s->si[1].flags = SI_FL_NONE;
-       if (likely(s->be->options2 & PR_O2_INDEPSTR))
+       if (likely(s->fe->options2 & PR_O2_INDEPSTR))
                s->si[1].flags |= SI_FL_INDEP_STR;
 
        s->srv = s->prev_srv = s->srv_conn = NULL;
index 94ed2c5993c0f19a2aade5b7249058fe0cefc84f..920dca99c4746166579a959ae77b3937ecdc068f 100644 (file)
@@ -3742,7 +3742,7 @@ void http_end_txn_clean_session(struct session *s)
        s->txn.meth = 0;
        http_reset_txn(s);
        s->txn.flags |= TX_NOT_FIRST | TX_WAIT_NEXT_RQ;
-       if (s->be->options2 & PR_O2_INDEPSTR)
+       if (s->fe->options2 & PR_O2_INDEPSTR)
                s->req->cons->flags |= SI_FL_INDEP_STR;
 
        /* if the request buffer is not empty, it means we're