]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http: Add debug messages when HTTP body analyzers are called
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Mar 2017 09:33:44 +0000 (11:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Mar 2017 12:38:33 +0000 (14:38 +0200)
Only DPRINTF() for developers.

src/proto_http.c

index a7a0503872bdfd98602b702bc42e2710293fa1e4..acfb26c34621b027e72bde79f9b9becb4dd326d2 100644 (file)
@@ -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;