]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Do not set shmem body for empty HTTP requests
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Nov 2016 14:47:41 +0000 (14:47 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Nov 2016 14:48:24 +0000 (14:48 +0000)
src/libutil/http.c

index e8f049ddc952a00d893371d7969633aaf09e176a..7842429a91e9f22dcc7adc4df34df8e88598b7fc 100644 (file)
@@ -633,7 +633,7 @@ rspamd_http_on_headers_complete (http_parser * parser)
         *
         * Hence, we skip body setup here
         */
-       if (parser->content_length != ULLONG_MAX) {
+       if (parser->content_length != ULLONG_MAX && parser->content_length != 0) {
                if (conn->max_size > 0 &&
                                parser->content_length > conn->max_size) {
                        /* Too large message */