mirror of
https://github.com/nodejs/http-parser.git
synced 2025-10-18 01:01:14 +08:00
Allow whitespace in the 'Content-Length' header.
This commit is contained in:

committed by
Ryan Dahl

parent
459507f534
commit
a66c61c190
@@ -1264,6 +1264,7 @@ size_t http_parser_execute (http_parser *parser,
|
||||
break;
|
||||
|
||||
case h_content_length:
|
||||
if (ch == ' ') break;
|
||||
if (ch < '0' || ch > '9') goto error;
|
||||
parser->content_length *= 10;
|
||||
parser->content_length += ch - '0';
|
||||
|
Reference in New Issue
Block a user