From c621534953da6fac2d6ac4571504985a999091c7 Mon Sep 17 00:00:00 2001 From: Sebastian Philipp Date: Wed, 22 Jul 2015 12:52:31 +0200 Subject: [PATCH] fixed compile error C2143 for vs2012 --- http_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http_parser.c b/http_parser.c index 2f3a66b5..99f5a23a 100644 --- a/http_parser.c +++ b/http_parser.c @@ -1841,11 +1841,12 @@ size_t http_parser_execute (http_parser *parser, case s_headers_done: { + int hasBody; STRICT_CHECK(ch != LF); parser->nread = 0; - int hasBody = parser->flags & F_CHUNKED || + hasBody = parser->flags & F_CHUNKED || (parser->content_length > 0 && parser->content_length != ULLONG_MAX); if (parser->upgrade && (parser->method == HTTP_CONNECT || (parser->flags & F_SKIPBODY) || !hasBody)) {