From 7612bf3302eef8a49658eaeca09504be588f6398 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 19 Jan 2017 14:54:39 -0800 Subject: Fix LZ4 warning. --- ext/http-parser/http_parser.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ext/http-parser/http_parser.c') diff --git a/ext/http-parser/http_parser.c b/ext/http-parser/http_parser.c index 3c896ffa..895bf0c7 100644 --- a/ext/http-parser/http_parser.c +++ b/ext/http-parser/http_parser.c @@ -1366,12 +1366,7 @@ reexecute: || c != CONTENT_LENGTH[parser->index]) { parser->header_state = h_general; } else if (parser->index == sizeof(CONTENT_LENGTH)-2) { - if (parser->flags & F_CONTENTLENGTH) { - SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH); - goto error; - } parser->header_state = h_content_length; - parser->flags |= F_CONTENTLENGTH; } break; @@ -1474,6 +1469,12 @@ reexecute: goto error; } + if (parser->flags & F_CONTENTLENGTH) { + SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH); + goto error; + } + + parser->flags |= F_CONTENTLENGTH; parser->content_length = ch - '0'; break; -- cgit v1.2.3