From a66c61c190a90653da3fd7c1443a1a7329472567 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 11 Oct 2010 23:53:33 -0700 Subject: [PATCH] Allow whitespace in the 'Content-Length' header. --- http_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/http_parser.c b/http_parser.c index 3f9bfdcc..02532d3a 100644 --- a/http_parser.c +++ b/http_parser.c @@ -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';