Skip to content

Commit

Permalink
Merge pull request nodejs#27 from a2800276/master
Browse files Browse the repository at this point in the history
lowercasing in header after check for CR LF
  • Loading branch information
pgriess committed Jun 11, 2011
2 parents e1d79e1 + 9656fd7 commit f684abd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,6 @@ size_t http_parser_execute (http_parser *parser,
state = s_header_value;
index = 0;

c = LOWER(ch);

if (ch == CR) {
CALLBACK(header_value);
header_state = h_general;
Expand All @@ -1245,6 +1243,8 @@ size_t http_parser_execute (http_parser *parser,
break;
}

c = LOWER(ch);

switch (header_state) {
case h_upgrade:
parser->flags |= F_UPGRADE;
Expand Down Expand Up @@ -1286,7 +1286,6 @@ size_t http_parser_execute (http_parser *parser,

case s_header_value:
{
c = LOWER(ch);

if (ch == CR) {
CALLBACK(header_value);
Expand All @@ -1299,6 +1298,8 @@ size_t http_parser_execute (http_parser *parser,
goto header_almost_done;
}

c = LOWER(ch);

switch (header_state) {
case h_general:
break;
Expand Down

0 comments on commit f684abd

Please sign in to comment.