From: Vsevolod Stakhov Date: Mon, 9 Sep 2019 10:28:45 +0000 (+0100) Subject: [Minor] Ignore trailing garbage X-Git-Tag: 2.0~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b92cb19c48639d65f68f0292dd342bb1a38e62d;p=thirdparty%2Frspamd.git [Minor] Ignore trailing garbage --- diff --git a/src/libutil/http_connection.c b/src/libutil/http_connection.c index 31e8a3c1e2..475a09c415 100644 --- a/src/libutil/http_connection.c +++ b/src/libutil/http_connection.c @@ -954,6 +954,14 @@ rspamd_http_event_handler (int fd, short what, gpointer ud) err = g_error_new (HTTP_ERROR, 400, "Encryption required"); } + else if (priv->parser.http_errno == HPE_CLOSED_CONNECTION) { + msg_err ("got garbage after end of the message, ignore it"); + + REF_RELEASE (pbuf); + rspamd_http_connection_unref (conn); + + return; + } else { err = g_error_new (HTTP_ERROR, 500 + priv->parser.http_errno, "HTTP parser error: %s",