From: Vsevolod Stakhov Date: Tue, 5 Jul 2016 13:26:41 +0000 (+0100) Subject: [Fix] Fix writing of HTTP messages X-Git-Tag: 1.3.0~163 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=578465e6b4242d3c9732b3865e88894d926e8871;p=thirdparty%2Frspamd.git [Fix] Fix writing of HTTP messages --- 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;