From 578465e6b4242d3c9732b3865e88894d926e8871 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Jul 2016 14:26:41 +0100 Subject: [PATCH] [Fix] Fix writing of HTTP messages --- src/libutil/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libutil/http.c b/src/libutil/http.c index 0ba8c8d2be..93e946ffce 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1928,7 +1928,7 @@ rspamd_http_connection_write_message_common (struct rspamd_http_connection *conn peer_key = msg->peer_key; - priv->wr_total = bodylen + buf->len + 2; + priv->wr_total = bodylen + 2; hdrcount = 0; HASH_ITER (hh, msg->headers, hdr, htmp) { @@ -1947,6 +1947,7 @@ rspamd_http_connection_write_message_common (struct rspamd_http_connection *conn repbuf, sizeof (repbuf), bodylen, enclen, host, conn, msg, &buf, priv, peer_key); + priv->wr_total += buf->len; /* Setup external request body */ priv->out[0].iov_base = buf->str; -- 2.47.3