ext/http11_client/http11_parser.c in rfuzz-0.8 vs ext/http11_client/http11_parser.c in rfuzz-0.9
- old
+ new
@@ -22,15 +22,15 @@
/** Data **/
#line 27 "ext/http11_client/http11_parser.c"
-static int httpclient_parser_start = 0;
+static const int httpclient_parser_start = 0;
-static int httpclient_parser_first_final = 36;
+static const int httpclient_parser_first_final = 36;
-static int httpclient_parser_error = 1;
+static const int httpclient_parser_error = 1;
#line 99 "ext/http11_client/http11_parser.rl"
int httpclient_parser_init(httpclient_parser *parser) {
int cs = 0;
@@ -67,12 +67,11 @@
#line 71 "ext/http11_client/http11_parser.c"
{
- p -= 1;
- if ( ++p == pe )
+ if ( p == pe )
goto _out;
switch ( cs )
{
case 0:
switch( (*p) ) {
@@ -112,11 +111,11 @@
goto st2;
st2:
if ( ++p == pe )
goto _out2;
case 2:
-#line 118 "ext/http11_client/http11_parser.c"
+#line 117 "ext/http11_client/http11_parser.c"
if ( (*p) == 10 )
goto tr34;
goto st1;
tr33:
#line 57 "ext/http11_client/http11_parser.rl"
@@ -155,21 +154,21 @@
goto st36;
st36:
if ( ++p == pe )
goto _out36;
case 36:
-#line 161 "ext/http11_client/http11_parser.c"
+#line 160 "ext/http11_client/http11_parser.c"
goto st1;
tr16:
#line 23 "ext/http11_client/http11_parser.rl"
{MARK(mark, p); }
goto st3;
st3:
if ( ++p == pe )
goto _out3;
case 3:
-#line 171 "ext/http11_client/http11_parser.c"
+#line 170 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr50;
case 59: goto tr51;
}
if ( (*p) < 65 ) {
@@ -207,11 +206,11 @@
goto st4;
st4:
if ( ++p == pe )
goto _out4;
case 4:
-#line 213 "ext/http11_client/http11_parser.c"
+#line 212 "ext/http11_client/http11_parser.c"
if ( (*p) == 10 )
goto tr35;
goto st1;
tr17:
#line 23 "ext/http11_client/http11_parser.rl"
@@ -219,11 +218,11 @@
goto st5;
st5:
if ( ++p == pe )
goto _out5;
case 5:
-#line 225 "ext/http11_client/http11_parser.c"
+#line 224 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr25;
case 59: goto tr27;
}
if ( (*p) < 65 ) {
@@ -261,11 +260,11 @@
goto st6;
st6:
if ( ++p == pe )
goto _out6;
case 6:
-#line 267 "ext/http11_client/http11_parser.c"
+#line 266 "ext/http11_client/http11_parser.c"
if ( (*p) == 10 )
goto tr33;
goto st1;
tr24:
#line 33 "ext/http11_client/http11_parser.rl"
@@ -293,11 +292,11 @@
goto st7;
st7:
if ( ++p == pe )
goto _out7;
case 7:
-#line 299 "ext/http11_client/http11_parser.c"
+#line 298 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr9;
case 124: goto tr9;
case 126: goto tr9;
}
@@ -325,11 +324,11 @@
goto st8;
st8:
if ( ++p == pe )
goto _out8;
case 8:
-#line 331 "ext/http11_client/http11_parser.c"
+#line 330 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr28;
case 33: goto st8;
case 59: goto tr30;
case 61: goto tr31;
@@ -364,11 +363,11 @@
goto st9;
st9:
if ( ++p == pe )
goto _out9;
case 9:
-#line 370 "ext/http11_client/http11_parser.c"
+#line 369 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr10;
case 124: goto tr10;
case 126: goto tr10;
}
@@ -396,11 +395,11 @@
goto st10;
st10:
if ( ++p == pe )
goto _out10;
case 10:
-#line 402 "ext/http11_client/http11_parser.c"
+#line 401 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr22;
case 33: goto st10;
case 59: goto tr24;
case 124: goto st10;
@@ -450,11 +449,11 @@
goto st11;
st11:
if ( ++p == pe )
goto _out11;
case 11:
-#line 456 "ext/http11_client/http11_parser.c"
+#line 455 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr63;
case 124: goto tr63;
case 126: goto tr63;
}
@@ -482,11 +481,11 @@
goto st12;
st12:
if ( ++p == pe )
goto _out12;
case 12:
-#line 488 "ext/http11_client/http11_parser.c"
+#line 487 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr56;
case 33: goto st12;
case 59: goto tr58;
case 61: goto tr59;
@@ -521,11 +520,11 @@
goto st13;
st13:
if ( ++p == pe )
goto _out13;
case 13:
-#line 527 "ext/http11_client/http11_parser.c"
+#line 526 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr61;
case 124: goto tr61;
case 126: goto tr61;
}
@@ -553,11 +552,11 @@
goto st14;
st14:
if ( ++p == pe )
goto _out14;
case 14:
-#line 559 "ext/http11_client/http11_parser.c"
+#line 558 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr47;
case 33: goto st14;
case 59: goto tr49;
case 124: goto st14;
@@ -601,11 +600,11 @@
goto st15;
st15:
if ( ++p == pe )
goto _out15;
case 15:
-#line 607 "ext/http11_client/http11_parser.c"
+#line 606 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr62;
case 124: goto tr62;
case 126: goto tr62;
}
@@ -633,11 +632,11 @@
goto st16;
st16:
if ( ++p == pe )
goto _out16;
case 16:
-#line 639 "ext/http11_client/http11_parser.c"
+#line 638 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr52;
case 33: goto st16;
case 59: goto tr54;
case 61: goto tr55;
@@ -672,11 +671,11 @@
goto st17;
st17:
if ( ++p == pe )
goto _out17;
case 17:
-#line 678 "ext/http11_client/http11_parser.c"
+#line 677 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto tr60;
case 124: goto tr60;
case 126: goto tr60;
}
@@ -704,11 +703,11 @@
goto st18;
st18:
if ( ++p == pe )
goto _out18;
case 18:
-#line 710 "ext/http11_client/http11_parser.c"
+#line 709 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr44;
case 33: goto st18;
case 59: goto tr46;
case 124: goto st18;
@@ -738,11 +737,11 @@
goto st19;
st19:
if ( ++p == pe )
goto _out19;
case 19:
-#line 744 "ext/http11_client/http11_parser.c"
+#line 743 "ext/http11_client/http11_parser.c"
if ( (*p) == 84 )
goto st20;
goto st1;
st20:
if ( ++p == pe )
@@ -805,11 +804,11 @@
goto st27;
st27:
if ( ++p == pe )
goto _out27;
case 27:
-#line 811 "ext/http11_client/http11_parser.c"
+#line 810 "ext/http11_client/http11_parser.c"
if ( 48 <= (*p) && (*p) <= 57 )
goto tr4;
goto st1;
tr4:
#line 23 "ext/http11_client/http11_parser.rl"
@@ -817,11 +816,11 @@
goto st28;
st28:
if ( ++p == pe )
goto _out28;
case 28:
-#line 823 "ext/http11_client/http11_parser.c"
+#line 822 "ext/http11_client/http11_parser.c"
if ( (*p) == 32 )
goto tr11;
if ( 48 <= (*p) && (*p) <= 57 )
goto st28;
goto st1;
@@ -833,21 +832,21 @@
goto st29;
st29:
if ( ++p == pe )
goto _out29;
case 29:
-#line 839 "ext/http11_client/http11_parser.c"
+#line 838 "ext/http11_client/http11_parser.c"
goto tr40;
tr40:
#line 23 "ext/http11_client/http11_parser.rl"
{MARK(mark, p); }
goto st30;
st30:
if ( ++p == pe )
goto _out30;
case 30:
-#line 849 "ext/http11_client/http11_parser.c"
+#line 848 "ext/http11_client/http11_parser.c"
if ( (*p) == 13 )
goto tr39;
goto st30;
tr37:
#line 33 "ext/http11_client/http11_parser.rl"
@@ -863,11 +862,11 @@
goto st31;
st31:
if ( ++p == pe )
goto _out31;
case 31:
-#line 869 "ext/http11_client/http11_parser.c"
+#line 868 "ext/http11_client/http11_parser.c"
if ( (*p) == 10 )
goto st32;
goto st1;
st32:
if ( ++p == pe )
@@ -903,11 +902,11 @@
goto st33;
st33:
if ( ++p == pe )
goto _out33;
case 33:
-#line 909 "ext/http11_client/http11_parser.c"
+#line 908 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 33: goto st33;
case 58: goto tr8;
case 124: goto st33;
case 126: goto st33;
@@ -942,11 +941,11 @@
goto st34;
st34:
if ( ++p == pe )
goto _out34;
case 34:
-#line 948 "ext/http11_client/http11_parser.c"
+#line 947 "ext/http11_client/http11_parser.c"
switch( (*p) ) {
case 13: goto tr37;
case 32: goto tr42;
}
goto tr41;
@@ -956,11 +955,11 @@
goto st35;
st35:
if ( ++p == pe )
goto _out35;
case 35:
-#line 962 "ext/http11_client/http11_parser.c"
+#line 961 "ext/http11_client/http11_parser.c"
if ( (*p) == 13 )
goto tr37;
goto st35;
}
_out1: cs = 1; goto _out;
@@ -1015,11 +1014,11 @@
assert(parser->field_start < len && "field starts after buffer end");
if(parser->body_start) {
/* final \r\n combo encountered so stop right here */
-#line 1021 "ext/http11_client/http11_parser.c"
+#line 1020 "ext/http11_client/http11_parser.c"
#line 144 "ext/http11_client/http11_parser.rl"
parser->nread++;
}
return(parser->nread);
@@ -1028,10 +1027,10 @@
int httpclient_parser_finish(httpclient_parser *parser)
{
int cs = parser->cs;
-#line 1034 "ext/http11_client/http11_parser.c"
+#line 1033 "ext/http11_client/http11_parser.c"
#line 155 "ext/http11_client/http11_parser.rl"
parser->cs = cs;
if (httpclient_parser_has_error(parser) ) {