Allow whitespace in the 'Content-Length' header.

This commit is contained in:
Nathan Rajlich
2010-10-11 23:53:33 -07:00
committed by Ryan Dahl
parent 459507f534
commit a66c61c190

View File

@@ -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';