Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

Commit 39ff097

Browse files
jscissrindutny
authored andcommitted
src: remove double check
This is already included in `http_message_needs_eof`. PR-URL: #248 Reviewed-By: Fedor Indutny <[email protected]>
1 parent f6f436a commit 39ff097

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

http_parser.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,8 +1857,7 @@ size_t http_parser_execute (http_parser *parser,
18571857
/* Content-Length header given and non-zero */
18581858
UPDATE_STATE(s_body_identity);
18591859
} else {
1860-
if (parser->type == HTTP_REQUEST ||
1861-
!http_message_needs_eof(parser)) {
1860+
if (!http_message_needs_eof(parser)) {
18621861
/* Assume content-length 0 - read the next */
18631862
UPDATE_STATE(NEW_MESSAGE());
18641863
CALLBACK_NOTIFY(message_complete);

0 commit comments

Comments
 (0)