Skip to content

Commit

Permalink
Allow whitespace in the 'Content-Length' header.
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate authored and ry committed Oct 12, 2010
1 parent 459507f commit a66c61c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions http_parser.c
Expand Up @@ -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';
Expand Down

0 comments on commit a66c61c

Please sign in to comment.