From 9656fd73de16585164bf14a67dc006aff2c7d80a Mon Sep 17 00:00:00 2001 From: Tim Becker Date: Sun, 5 Dec 2010 15:26:26 +0100 Subject: [PATCH] moved unecessary lookup --- http_parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/http_parser.c b/http_parser.c index 492ef171..b11cc953 100644 --- a/http_parser.c +++ b/http_parser.c @@ -1186,8 +1186,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; @@ -1201,6 +1199,8 @@ size_t http_parser_execute (http_parser *parser, break; } + c = LOWER(ch); + switch (header_state) { case h_upgrade: parser->flags |= F_UPGRADE; @@ -1242,7 +1242,6 @@ size_t http_parser_execute (http_parser *parser, case s_header_value: { - c = LOWER(ch); if (ch == CR) { CALLBACK(header_value); @@ -1255,6 +1254,8 @@ size_t http_parser_execute (http_parser *parser, goto header_almost_done; } + c = LOWER(ch); + switch (header_state) { case h_general: break;