<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,4 @@
+
 #line 1 &quot;http11_parser.rl&quot;
 /**
  * Copyright (c) 2005 Zed A. Shaw
@@ -18,166 +19,183 @@
 
 
 /** machine **/
+
 #line 95 &quot;http11_parser.rl&quot;
 
 
 /** Data **/
 
-#line 27 &quot;http11_parser.c&quot;
+#line 29 &quot;http11_parser.c&quot;
 static const char _httpclient_parser_actions[] = {
 	0, 1, 0, 1, 1, 1, 2, 1, 
 	3, 1, 4, 1, 5, 1, 7, 1, 
-	8, 1, 10, 2, 2, 3, 2, 6, 
-	0, 2, 6, 5, 2, 9, 10, 2, 
-	10, 9, 3, 2, 3, 4
+	8, 1, 10, 2, 0, 5, 2, 2, 
+	3, 2, 3, 4, 2, 4, 10, 2, 
+	6, 0, 2, 8, 10, 2, 9, 10, 
+	2, 10, 9, 3, 2, 3, 4, 3, 
+	4, 9, 10, 3, 4, 10, 9, 3, 
+	6, 0, 5, 3, 8, 10, 9, 4, 
+	2, 3, 4, 10, 5, 2, 3, 4, 
+	9, 10, 5, 2, 3, 4, 10, 9
+	
 };
 
 static const short _httpclient_parser_key_offsets[] = {
-	0, 10, 10, 11, 22, 26, 27, 28, 
-	39, 54, 75, 90, 110, 125, 146, 161, 
-	181, 196, 214, 229, 246, 247, 248, 249, 
-	250, 252, 255, 257, 260, 262, 264, 266, 
-	268, 269, 270, 286, 302, 304, 305, 306
+	0, 0, 11, 12, 24, 29, 30, 31, 
+	43, 58, 80, 95, 116, 131, 153, 168, 
+	189, 204, 223, 238, 256, 257, 258, 259, 
+	260, 262, 265, 267, 270, 272, 274, 276, 
+	279, 281, 298, 314, 317, 319, 320, 322
 };
 
 static const char _httpclient_parser_trans_keys[] = {
-	13, 48, 59, 72, 49, 57, 65, 70, 
-	97, 102, 10, 13, 32, 59, 9, 12, 
-	48, 57, 65, 70, 97, 102, 13, 32, 
-	9, 12, 10, 10, 13, 32, 59, 9, 
-	12, 48, 57, 65, 70, 97, 102, 33, 
-	124, 126, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 13, 32, 
-	33, 59, 61, 124, 126, 9, 12, 35, 
-	39, 42, 43, 45, 46, 48, 57, 65, 
-	90, 94, 122, 33, 124, 126, 35, 39, 
-	42, 43, 45, 46, 48, 57, 65, 90, 
-	94, 122, 13, 32, 33, 59, 124, 126, 
-	9, 12, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 33, 124, 
-	126, 35, 39, 42, 43, 45, 46, 48, 
-	57, 65, 90, 94, 122, 13, 32, 33, 
-	59, 61, 124, 126, 9, 12, 35, 39, 
+	10, 13, 48, 59, 72, 49, 57, 65, 
+	70, 97, 102, 10, 10, 13, 32, 59, 
+	9, 12, 48, 57, 65, 70, 97, 102, 
+	10, 13, 32, 9, 12, 10, 10, 10, 
+	13, 32, 59, 9, 12, 48, 57, 65, 
+	70, 97, 102, 33, 124, 126, 35, 39, 
 	42, 43, 45, 46, 48, 57, 65, 90, 
-	94, 122, 33, 124, 126, 35, 39, 42, 
+	94, 122, 10, 13, 32, 33, 59, 61, 
+	124, 126, 9, 12, 35, 39, 42, 43, 
+	45, 46, 48, 57, 65, 90, 94, 122, 
+	33, 124, 126, 35, 39, 42, 43, 45, 
+	46, 48, 57, 65, 90, 94, 122, 10, 
+	13, 32, 33, 59, 124, 126, 9, 12, 
+	35, 39, 42, 43, 45, 46, 48, 57, 
+	65, 90, 94, 122, 33, 124, 126, 35, 
+	39, 42, 43, 45, 46, 48, 57, 65, 
+	90, 94, 122, 10, 13, 32, 33, 59, 
+	61, 124, 126, 9, 12, 35, 39, 42, 
 	43, 45, 46, 48, 57, 65, 90, 94, 
-	122, 13, 32, 33, 59, 124, 126, 9, 
+	122, 33, 124, 126, 35, 39, 42, 43, 
+	45, 46, 48, 57, 65, 90, 94, 122, 
+	10, 13, 32, 33, 59, 124, 126, 9, 
 	12, 35, 39, 42, 43, 45, 46, 48, 
 	57, 65, 90, 94, 122, 33, 124, 126, 
 	35, 39, 42, 43, 45, 46, 48, 57, 
-	65, 90, 94, 122, 13, 33, 59, 61, 
-	124, 126, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 33, 124, 
-	126, 35, 39, 42, 43, 45, 46, 48, 
-	57, 65, 90, 94, 122, 13, 33, 59, 
-	124, 126, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 84, 84, 
-	80, 47, 48, 57, 46, 48, 57, 48, 
-	57, 32, 48, 57, 48, 57, 48, 57, 
-	48, 57, 13, 32, 13, 10, 13, 33, 
-	124, 126, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 33, 58, 
+	65, 90, 94, 122, 10, 13, 33, 59, 
+	61, 124, 126, 35, 39, 42, 43, 45, 
+	46, 48, 57, 65, 90, 94, 122, 33, 
 	124, 126, 35, 39, 42, 43, 45, 46, 
-	48, 57, 65, 90, 94, 122, 13, 32, 
-	13, 13, 0
+	48, 57, 65, 90, 94, 122, 10, 13, 
+	33, 59, 124, 126, 35, 39, 42, 43, 
+	45, 46, 48, 57, 65, 90, 94, 122, 
+	84, 84, 80, 47, 48, 57, 46, 48, 
+	57, 48, 57, 32, 48, 57, 48, 57, 
+	48, 57, 48, 57, 10, 13, 32, 10, 
+	13, 10, 13, 33, 124, 126, 35, 39, 
+	42, 43, 45, 46, 48, 57, 65, 90, 
+	94, 122, 33, 58, 124, 126, 35, 39, 
+	42, 43, 45, 46, 48, 57, 65, 90, 
+	94, 122, 10, 13, 32, 10, 13, 10, 
+	10, 13, 0
 };
 
 static const char _httpclient_parser_single_lengths[] = {
-	4, 0, 1, 3, 2, 1, 1, 3, 
-	3, 7, 3, 6, 3, 7, 3, 6, 
-	3, 6, 3, 5, 1, 1, 1, 1, 
-	0, 1, 0, 1, 0, 0, 0, 2, 
-	1, 1, 4, 4, 2, 1, 1, 0
+	0, 5, 1, 4, 3, 1, 1, 4, 
+	3, 8, 3, 7, 3, 8, 3, 7, 
+	3, 7, 3, 6, 1, 1, 1, 1, 
+	0, 1, 0, 1, 0, 0, 0, 3, 
+	2, 5, 4, 3, 2, 1, 2, 0
 };
 
 static const char _httpclient_parser_range_lengths[] = {
-	3, 0, 0, 4, 1, 0, 0, 4, 
+	0, 3, 0, 4, 1, 0, 0, 4, 
 	6, 7, 6, 7, 6, 7, 6, 7, 
 	6, 6, 6, 6, 0, 0, 0, 0, 
 	1, 1, 1, 1, 1, 1, 1, 0, 
-	0, 0, 6, 6, 0, 0, 0, 0
+	0, 6, 6, 0, 0, 0, 0, 0
 };
 
-static const unsigned char _httpclient_parser_index_offsets[] = {
-	0, 8, 8, 10, 18, 22, 24, 26, 
-	34, 44, 59, 69, 83, 93, 108, 118, 
-	132, 142, 155, 165, 177, 179, 181, 183, 
-	185, 187, 190, 192, 195, 197, 199, 201, 
-	204, 206, 208, 219, 230, 233, 235, 237
+static const short _httpclient_parser_index_offsets[] = {
+	0, 0, 9, 11, 20, 25, 27, 29, 
+	38, 48, 64, 74, 89, 99, 115, 125, 
+	140, 150, 164, 174, 187, 189, 191, 193, 
+	195, 197, 200, 202, 205, 207, 209, 211, 
+	215, 218, 230, 241, 245, 248, 250, 253
 };
 
 static const char _httpclient_parser_indicies[] = {
-	14, 15, 17, 18, 16, 16, 16, 0, 
-	30, 0, 63, 37, 64, 37, 39, 39, 
-	39, 0, 19, 32, 32, 0, 29, 0, 
-	31, 0, 38, 37, 40, 37, 39, 39, 
-	39, 0, 58, 58, 58, 58, 58, 58, 
-	58, 58, 58, 0, 42, 41, 43, 44, 
-	45, 43, 43, 41, 43, 43, 43, 43, 
-	43, 43, 0, 59, 59, 59, 59, 59, 
-	59, 59, 59, 59, 0, 34, 33, 35, 
-	36, 35, 35, 33, 35, 35, 35, 35, 
-	35, 35, 0, 70, 70, 70, 70, 70, 
-	70, 70, 70, 70, 0, 65, 41, 66, 
-	67, 68, 66, 66, 41, 66, 66, 66, 
-	66, 66, 66, 0, 69, 69, 69, 69, 
-	69, 69, 69, 69, 69, 0, 60, 33, 
-	61, 62, 61, 61, 33, 61, 61, 61, 
-	61, 61, 61, 0, 10, 10, 10, 10, 
-	10, 10, 10, 10, 10, 0, 24, 25, 
-	26, 27, 25, 25, 25, 25, 25, 25, 
-	25, 25, 0, 11, 11, 11, 11, 11, 
-	11, 11, 11, 11, 0, 21, 22, 23, 
-	22, 22, 22, 22, 22, 22, 22, 22, 
-	0, 1, 0, 56, 0, 2, 0, 5, 
-	0, 7, 0, 6, 7, 0, 13, 0, 
-	12, 13, 0, 4, 0, 3, 0, 57, 
-	0, 54, 55, 53, 49, 48, 28, 0, 
-	19, 20, 20, 20, 20, 20, 20, 20, 
-	20, 20, 0, 8, 9, 8, 8, 8, 
-	8, 8, 8, 8, 8, 0, 47, 52, 
-	51, 47, 46, 49, 50, 0, 0
+	0, 2, 3, 5, 6, 4, 4, 4, 
+	1, 0, 1, 8, 9, 7, 11, 7, 
+	10, 10, 10, 1, 13, 14, 12, 12, 
+	1, 13, 1, 15, 1, 16, 17, 7, 
+	18, 7, 10, 10, 10, 1, 19, 19, 
+	19, 19, 19, 19, 19, 19, 19, 1, 
+	21, 22, 20, 23, 24, 25, 23, 23, 
+	20, 23, 23, 23, 23, 23, 23, 1, 
+	26, 26, 26, 26, 26, 26, 26, 26, 
+	26, 1, 28, 29, 27, 30, 31, 30, 
+	30, 27, 30, 30, 30, 30, 30, 30, 
+	1, 32, 32, 32, 32, 32, 32, 32, 
+	32, 32, 1, 33, 34, 20, 35, 36, 
+	37, 35, 35, 20, 35, 35, 35, 35, 
+	35, 35, 1, 38, 38, 38, 38, 38, 
+	38, 38, 38, 38, 1, 39, 40, 27, 
+	41, 42, 41, 41, 27, 41, 41, 41, 
+	41, 41, 41, 1, 43, 43, 43, 43, 
+	43, 43, 43, 43, 43, 1, 44, 45, 
+	46, 47, 48, 46, 46, 46, 46, 46, 
+	46, 46, 46, 1, 49, 49, 49, 49, 
+	49, 49, 49, 49, 49, 1, 50, 51, 
+	52, 53, 52, 52, 52, 52, 52, 52, 
+	52, 52, 1, 54, 1, 55, 1, 56, 
+	1, 57, 1, 58, 1, 59, 58, 1, 
+	60, 1, 61, 60, 1, 62, 1, 63, 
+	1, 64, 1, 66, 67, 68, 65, 70, 
+	71, 69, 13, 14, 72, 72, 72, 72, 
+	72, 72, 72, 72, 72, 1, 73, 74, 
+	73, 73, 73, 73, 73, 73, 73, 73, 
+	1, 76, 77, 78, 75, 80, 81, 79, 
+	82, 1, 84, 85, 83, 1, 0
 };
 
-static const char _httpclient_parser_trans_targs_wi[] = {
-	1, 21, 23, 30, 29, 24, 26, 25, 
-	35, 36, 17, 19, 28, 27, 2, 3, 
-	7, 16, 20, 5, 35, 2, 19, 16, 
-	2, 17, 16, 18, 34, 39, 39, 39, 
-	4, 4, 5, 11, 8, 4, 5, 7, 
-	8, 4, 5, 9, 8, 10, 37, 33, 
-	32, 33, 32, 37, 36, 32, 33, 38, 
-	22, 31, 9, 11, 6, 15, 12, 6, 
-	12, 6, 13, 12, 14, 15, 13
+static const char _httpclient_parser_trans_targs[] = {
+	39, 0, 2, 3, 7, 16, 20, 4, 
+	39, 6, 7, 12, 4, 39, 5, 39, 
+	39, 5, 8, 9, 4, 39, 5, 9, 
+	8, 10, 11, 4, 39, 5, 11, 8, 
+	13, 39, 6, 13, 12, 14, 15, 39, 
+	6, 15, 12, 17, 39, 2, 17, 16, 
+	18, 19, 39, 2, 19, 16, 21, 22, 
+	23, 24, 25, 26, 27, 28, 29, 30, 
+	31, 32, 33, 37, 38, 32, 33, 37, 
+	34, 34, 35, 36, 33, 37, 35, 36, 
+	33, 37, 33, 32, 33, 37
 };
 
-static const char _httpclient_parser_trans_actions_wi[] = {
-	0, 0, 0, 0, 1, 0, 0, 0, 
-	0, 5, 3, 7, 13, 0, 0, 1, 
-	1, 0, 1, 0, 3, 9, 0, 9, 
-	34, 0, 34, 19, 0, 17, 28, 31, 
-	0, 9, 9, 0, 9, 15, 15, 0, 
-	15, 34, 34, 0, 34, 19, 0, 9, 
-	0, 11, 1, 7, 7, 22, 25, 22, 
-	0, 0, 3, 7, 9, 0, 9, 15, 
-	15, 34, 0, 34, 19, 7, 3
+static const char _httpclient_parser_trans_actions[] = {
+	37, 0, 0, 1, 1, 0, 1, 15, 
+	59, 15, 0, 15, 0, 17, 0, 40, 
+	34, 15, 15, 3, 43, 63, 43, 0, 
+	43, 22, 7, 9, 28, 9, 0, 9, 
+	3, 74, 43, 0, 43, 22, 7, 51, 
+	9, 0, 9, 3, 68, 43, 0, 43, 
+	22, 7, 47, 9, 0, 9, 0, 0, 
+	0, 0, 0, 0, 0, 13, 1, 0, 
+	0, 31, 55, 55, 31, 0, 11, 11, 
+	3, 0, 5, 7, 25, 25, 7, 0, 
+	9, 9, 0, 1, 19, 19
 };
 
-static const int httpclient_parser_start = 0;
-
+static const int httpclient_parser_start = 1;
 static const int httpclient_parser_first_final = 39;
+static const int httpclient_parser_error = 0;
+
+static const int httpclient_parser_en_main = 1;
 
-static const int httpclient_parser_error = 1;
 
 #line 99 &quot;http11_parser.rl&quot;
 
 int httpclient_parser_init(httpclient_parser *parser)  {
   int cs = 0;
   
-#line 178 &quot;http11_parser.c&quot;
+#line 195 &quot;http11_parser.c&quot;
 	{
 	cs = httpclient_parser_start;
 	}
+
 #line 103 &quot;http11_parser.rl&quot;
   parser-&gt;cs = cs;
   parser-&gt;body_start = 0;
@@ -206,7 +224,7 @@ size_t httpclient_parser_execute(httpclient_parser *parser, const char *buffer,
 
 
   
-#line 210 &quot;http11_parser.c&quot;
+#line 228 &quot;http11_parser.c&quot;
 	{
 	int _klen;
 	unsigned int _trans;
@@ -215,10 +233,10 @@ size_t httpclient_parser_execute(httpclient_parser *parser, const char *buffer,
 	const char *_keys;
 
 	if ( p == pe )
+		goto _test_eof;
+	if ( cs == 0 )
 		goto _out;
 _resume:
-	if ( cs == 1 )
-		goto _out;
 	_keys = _httpclient_parser_trans_keys + _httpclient_parser_key_offsets[cs];
 	_trans = _httpclient_parser_index_offsets[cs];
 
@@ -269,12 +287,12 @@ _resume:
 
 _match:
 	_trans = _httpclient_parser_indicies[_trans];
-	cs = _httpclient_parser_trans_targs_wi[_trans];
+	cs = _httpclient_parser_trans_targs[_trans];
 
-	if ( _httpclient_parser_trans_actions_wi[_trans] == 0 )
+	if ( _httpclient_parser_trans_actions[_trans] == 0 )
 		goto _again;
 
-	_acts = _httpclient_parser_actions + _httpclient_parser_trans_actions_wi[_trans];
+	_acts = _httpclient_parser_actions + _httpclient_parser_trans_actions[_trans];
 	_nacts = (unsigned int) *_acts++;
 	while ( _nacts-- &gt; 0 )
 	{
@@ -340,18 +358,22 @@ _match:
     parser-&gt;body_start = p - buffer + 1; 
     if(parser-&gt;header_done != NULL)
       parser-&gt;header_done(parser-&gt;data, p + 1, pe - p - 1);
-    goto _out;
+    {p++; goto _out; }
   }
 	break;
-#line 347 &quot;http11_parser.c&quot;
+#line 365 &quot;http11_parser.c&quot;
 		}
 	}
 
 _again:
+	if ( cs == 0 )
+		goto _out;
 	if ( ++p != pe )
 		goto _resume;
+	_test_eof: {}
 	_out: {}
 	}
+
 #line 130 &quot;http11_parser.rl&quot;
 
   parser-&gt;cs = cs;
@@ -366,10 +388,7 @@ _again:
 
   if(parser-&gt;body_start) {
     /* final \r\n combo encountered so stop right here */
-    
-#line 371 &quot;http11_parser.c&quot;
-#line 144 &quot;http11_parser.rl&quot;
-    parser-&gt;nread++;
+    parser-&gt;nread = parser-&gt;body_start;
   }
 
   return(parser-&gt;nread);
@@ -379,10 +398,6 @@ int httpclient_parser_finish(httpclient_parser *parser)
 {
   int cs = parser-&gt;cs;
 
-  
-#line 384 &quot;http11_parser.c&quot;
-#line 155 &quot;http11_parser.rl&quot;
-
   parser-&gt;cs = cs;
 
   if (httpclient_parser_has_error(parser) ) {</diff>
      <filename>ext/http11_client/http11_parser.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>78a0bf52edfe8db3901c085d6481fd59ee77157b</id>
    </parent>
  </parents>
  <author>
    <name>Astro</name>
    <email>astro@spaceboyz.net</email>
  </author>
  <url>http://github.com/igrigorik/em-http-request/commit/3b051ee381370b74b14d4b0ad5738066c9d73bfb</url>
  <id>3b051ee381370b74b14d4b0ad5738066c9d73bfb</id>
  <committed-date>2009-10-25T12:15:27-07:00</committed-date>
  <authored-date>2009-10-20T09:55:40-07:00</authored-date>
  <message>rebuild http11_parser.c from http11_parser.rl

Signed-off-by: Ilya Grigorik &lt;ilya@igvita.com&gt;</message>
  <tree>65d242d4c359b4b39c788997215cdda81e7cc7fe</tree>
  <committer>
    <name>Ilya Grigorik</name>
    <email>ilya@igvita.com</email>
  </committer>
</commit>
