From: Christopher Faulet Date: Thu, 30 Mar 2017 09:33:44 +0000 (+0200) Subject: MINOR: http: Add debug messages when HTTP body analyzers are called X-Git-Tag: v1.8-dev1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=814d2703607fd994505ecd8e2e6480e83e20162e;p=thirdparty%2Fhaproxy.git MINOR: http: Add debug messages when HTTP body analyzers are called Only DPRINTF() for developers. --- diff --git a/src/proto_http.c b/src/proto_http.c index a7a0503872..acfb26c346 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5593,6 +5593,13 @@ int http_resync_states(struct stream *s) break; } + DPRINTF(stderr,"[%u] %s: stream=%p old=%d,%d cur=%d,%d\n", + now_ms, __FUNCTION__, + s, + old_req_state, old_res_state, + txn->req.msg_state, txn->rsp.msg_state); + + /* OK, both state machines agree on a compatible state. * There are a few cases we're interested in : * - HTTP_MSG_TUNNEL on either means we have to disable both analysers @@ -5679,6 +5686,15 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit) struct http_msg *msg = &s->txn->req; int ret; + DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n", + now_ms, __FUNCTION__, + s, + req, + req->rex, req->wex, + req->flags, + req->buf->i, + req->analysers); + if (unlikely(msg->msg_state < HTTP_MSG_BODY)) return 0; @@ -6865,6 +6881,15 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit struct http_msg *msg = &s->txn->rsp; int ret; + DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n", + now_ms, __FUNCTION__, + s, + res, + res->rex, res->wex, + res->flags, + res->buf->i, + res->analysers); + if (unlikely(msg->msg_state < HTTP_MSG_BODY)) return 0;