]> source.dussan.org Git - 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:47:41 +0000 (14:47 +0000)
src/libutil/http.c

index ba0d5117c22f8382adca38116df4a68e9a7ad50b..4f1ce1ade626056caffca91398c0e658a7febb75 100644 (file)
@@ -650,7 +650,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 */