]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] client: always ensure to zero rep->analysers
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Jun 2010 17:45:06 +0000 (19:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 4 Jun 2010 12:49:27 +0000 (14:49 +0200)
The response analyser was not emptied upon creation of a new session. In
fact it was always zero just because last session leaved it in a zero state,
but in case of shared pools this cannot be guaranteed. The net effect is
that it was possible to have some HTTP (or any other) analysers on the
response path of a stats unix socket, which would reject the response.

This fix must be backported to 1.4.

src/client.c
src/proto_uxst.c

index 444d47fb56875ab61a7d2e52f2829b14377ce0ea..be0c90268e1be069a7bccd1d80093267d04933d3 100644 (file)
@@ -413,6 +413,7 @@ int event_accept(int fd) {
                s->rep->prod = &s->si[1];
                s->rep->cons = &s->si[0];
                s->si[0].ob = s->si[1].ib = s->rep;
+               s->rep->analysers = 0;
 
                s->rep->rto = s->be->timeout.server;
                s->rep->wto = s->fe->timeout.client;
index 91b394489e16d925cc4d2f84d76cf5366ea5c962..eb4a53dd0094daf2e5529a96a216efe593256d2f 100644 (file)
@@ -514,6 +514,7 @@ int uxst_event_accept(int fd) {
                s->rep->prod = &s->si[1];
                s->rep->cons = &s->si[0];
                s->si[0].ob = s->si[1].ib = s->rep;
+               s->rep->analysers = 0;
 
                s->rep->rto = TICK_ETERNITY;
                s->rep->cto = TICK_ETERNITY;