From: Vsevolod Stakhov Date: Tue, 22 Apr 2014 16:12:09 +0000 (+0100) Subject: Fix issue with writing messages without body. X-Git-Tag: 0.7.0~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ce3f00936a96bf8ab88066e298b2677219f09f0;p=thirdparty%2Frspamd.git Fix issue with writing messages without body. --- diff --git a/src/libutil/http.c b/src/libutil/http.c index 491468352e..3fa4bd3a88 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -800,7 +800,7 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, msg->code, rspamd_http_code_to_str (msg->code), "rspamd/" RVERSION, datebuf, - msg->body->len, + bodylen, mime_type); } else { @@ -815,13 +815,13 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, "Connection: close\r\n" "Host: %s\r\n" "Content-Length: %z\r\n", - http_method_str (msg->method), msg->url, host, msg->body->len); + http_method_str (msg->method), msg->url, host, bodylen); } else { /* Fallback to HTTP/1.0 */ rspamd_printf_gstring (priv->buf, "%s %v HTTP/1.0\r\n" "Content-Length: %z\r\n", - http_method_str (msg->method), msg->url, msg->body->len); + http_method_str (msg->method), msg->url, bodylen); } } /* Allocate iov */