From 39ff0975c220ef76a2d98c8ac61b0d36f4dce80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Wed, 20 May 2015 18:21:22 +0200 Subject: [PATCH] src: remove double check This is already included in `http_message_needs_eof`. PR-URL: https://github.com/joyent/http-parser/pull/248 Reviewed-By: Fedor Indutny --- http_parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http_parser.c b/http_parser.c index 91f76f2..cbe8a90 100644 --- a/http_parser.c +++ b/http_parser.c @@ -1857,8 +1857,7 @@ reexecute: /* Content-Length header given and non-zero */ UPDATE_STATE(s_body_identity); } else { - if (parser->type == HTTP_REQUEST || - !http_message_needs_eof(parser)) { + if (!http_message_needs_eof(parser)) { /* Assume content-length 0 - read the next */ UPDATE_STATE(NEW_MESSAGE()); CALLBACK_NOTIFY(message_complete);