diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-21 11:14:45 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-21 11:16:28 -0700 |
commit | 7b6512704b53065fc12fedf1341657435c91d0a4 (patch) | |
tree | c8119df55c8c8cb7c488ff78ad6c7c3c67a3808b /ext/unicorn/http11/http11_parser.rl | |
parent | 3ab21cf1733faa2384944d65157e96463c7b9dbe (diff) | |
download | unicorn-7b6512704b53065fc12fedf1341657435c91d0a4.tar.gz |
Diffstat (limited to 'ext/unicorn/http11/http11_parser.rl')
-rw-r--r-- | ext/unicorn/http11/http11_parser.rl | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/unicorn/http11/http11_parser.rl b/ext/unicorn/http11/http11_parser.rl index 4afafc0..ee3c93d 100644 --- a/ext/unicorn/http11/http11_parser.rl +++ b/ext/unicorn/http11/http11_parser.rl @@ -13,10 +13,10 @@ */ static void snake_upcase_char(char *c) { - if (*c >= 'a' && *c <= 'z') - *c &= ~0x20; - else if (*c == '-') - *c = '_'; + if (*c >= 'a' && *c <= 'z') + *c &= ~0x20; + else if (*c == '-') + *c = '_'; } static void downcase_char(char *c) @@ -32,12 +32,10 @@ static void downcase_char(char *c) /** Machine **/ %%{ - machine http_parser; action mark {MARK(mark, fpc); } - action start_field { MARK(field_start, fpc); } action snake_upcase_field { snake_upcase_char((char *)fpc); } action downcase_char { downcase_char((char *)fpc); } @@ -88,7 +86,6 @@ static void downcase_char(char *c) } include http_parser_common "http11_parser_common.rl"; - }%% /** Data **/ @@ -107,7 +104,6 @@ int http_parser_init(http_parser *parser) { return(1); } - /** exec **/ size_t http_parser_execute(http_parser *parser, const char *buffer, size_t len) { const char *p, *pe; |