about summary refs log tree commit homepage
path: root/ext/unicorn/http11/http11_parser.rl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/unicorn/http11/http11_parser.rl')
-rw-r--r--ext/unicorn/http11/http11_parser.rl12
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;