Merge pull request #27 from a2800276/master

lowercasing in header after check for CR LF
v0.6
Peter Griess 14 years ago
commit f684abdcc5

@ -1230,8 +1230,6 @@ size_t http_parser_execute (http_parser *parser,
state = s_header_value; state = s_header_value;
index = 0; index = 0;
c = LOWER(ch);
if (ch == CR) { if (ch == CR) {
CALLBACK(header_value); CALLBACK(header_value);
header_state = h_general; header_state = h_general;
@ -1245,6 +1243,8 @@ size_t http_parser_execute (http_parser *parser,
break; break;
} }
c = LOWER(ch);
switch (header_state) { switch (header_state) {
case h_upgrade: case h_upgrade:
parser->flags |= F_UPGRADE; parser->flags |= F_UPGRADE;
@ -1286,7 +1286,6 @@ size_t http_parser_execute (http_parser *parser,
case s_header_value: case s_header_value:
{ {
c = LOWER(ch);
if (ch == CR) { if (ch == CR) {
CALLBACK(header_value); CALLBACK(header_value);
@ -1299,6 +1298,8 @@ size_t http_parser_execute (http_parser *parser,
goto header_almost_done; goto header_almost_done;
} }
c = LOWER(ch);
switch (header_state) { switch (header_state) {
case h_general: case h_general:
break; break;

Loading…
Cancel
Save