diff options
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r-- | src/libutil/http.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index dedf8572d..cbafec678 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -703,6 +703,10 @@ rspamd_http_on_body (http_parser * parser, const gchar *at, size_t length) } } + if (conn->finished) { + return 0; + } + if (conn->max_size > 0 && msg->body_buf.len + length > conn->max_size) { /* Body length overflow */ @@ -756,6 +760,10 @@ rspamd_http_on_body_decrypted (http_parser * parser, const gchar *at, size_t len priv->header = NULL; } + if (conn->finished) { + return 0; + } + if (priv->msg->body_buf.len == 0) { priv->msg->body_buf.begin = at; @@ -896,6 +904,10 @@ rspamd_http_on_message_complete (http_parser * parser) int ret = 0; enum rspamd_cryptobox_mode mode; + if (conn->finished) { + return 0; + } + priv = conn->priv; if ((conn->opts & RSPAMD_HTTP_BODY_PARTIAL) == 0 && IS_CONN_ENCRYPTED (priv)) { |