@@ -49,7 +49,7 @@ static const unsigned char llparse_blob7[] = {
49
49
};
50
50
#ifdef __SSE4_2__
51
51
static const unsigned char ALIGN (16 ) llparse_blob8 [] = {
52
- 0x9 , 0x9 , ' ' , '~' , 0x80 , 0xfe , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 ,
52
+ 0x9 , 0x9 , ' ' , '~' , 0x80 , 0xff , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 ,
53
53
0x0 , 0x0 , 0x0 , 0x0 , 0x0
54
54
};
55
55
#endif /* __SSE4_2__ */
@@ -616,9 +616,9 @@ int llhttp__internal__c_mul_add_content_length(
616
616
if (state -> content_length > 0xffffffffffffffffULL / 16 ) {
617
617
return 1 ;
618
618
}
619
-
619
+
620
620
state -> content_length *= 16 ;
621
-
621
+
622
622
/* Addition overflow */
623
623
if (match >= 0 ) {
624
624
if (state -> content_length > 0xffffffffffffffffULL - match ) {
@@ -780,9 +780,9 @@ int llhttp__internal__c_mul_add_content_length_1(
780
780
if (state -> content_length > 0xffffffffffffffffULL / 10 ) {
781
781
return 1 ;
782
782
}
783
-
783
+
784
784
state -> content_length *= 10 ;
785
-
785
+
786
786
/* Addition overflow */
787
787
if (match >= 0 ) {
788
788
if (state -> content_length > 0xffffffffffffffffULL - match ) {
@@ -871,9 +871,9 @@ int llhttp__internal__c_mul_add_status_code(
871
871
if (state -> status_code > 0xffff / 10 ) {
872
872
return 1 ;
873
873
}
874
-
874
+
875
875
state -> status_code *= 10 ;
876
-
876
+
877
877
/* Addition overflow */
878
878
if (match >= 0 ) {
879
879
if (state -> status_code > 0xffff - match ) {
@@ -885,7 +885,7 @@ int llhttp__internal__c_mul_add_status_code(
885
885
}
886
886
}
887
887
state -> status_code += match ;
888
-
888
+
889
889
/* Enforce maximum */
890
890
if (state -> status_code > 999 ) {
891
891
return 1 ;
@@ -991,7 +991,7 @@ static llparse_state_t llhttp__internal__run(
991
991
case s_n_llhttp__internal__n_chunk_data_almost_done :
992
992
s_n_llhttp__internal__n_chunk_data_almost_done : {
993
993
llparse_match_t match_seq ;
994
-
994
+
995
995
if (p == endp ) {
996
996
return s_n_llhttp__internal__n_chunk_data_almost_done ;
997
997
}
@@ -1016,15 +1016,15 @@ static llparse_state_t llhttp__internal__run(
1016
1016
s_n_llhttp__internal__n_consume_content_length : {
1017
1017
size_t avail ;
1018
1018
size_t need ;
1019
-
1019
+
1020
1020
avail = endp - p ;
1021
1021
need = state -> content_length ;
1022
1022
if (avail >= need ) {
1023
1023
p += need ;
1024
1024
state -> content_length = 0 ;
1025
1025
goto s_n_llhttp__internal__n_span_end_llhttp__on_body ;
1026
1026
}
1027
-
1027
+
1028
1028
state -> content_length -= avail ;
1029
1029
return s_n_llhttp__internal__n_consume_content_length ;
1030
1030
/* UNREACHABLE */ ;
@@ -1371,15 +1371,15 @@ static llparse_state_t llhttp__internal__run(
1371
1371
s_n_llhttp__internal__n_consume_content_length_1 : {
1372
1372
size_t avail ;
1373
1373
size_t need ;
1374
-
1374
+
1375
1375
avail = endp - p ;
1376
1376
need = state -> content_length ;
1377
1377
if (avail >= need ) {
1378
1378
p += need ;
1379
1379
state -> content_length = 0 ;
1380
1380
goto s_n_llhttp__internal__n_span_end_llhttp__on_body_1 ;
1381
1381
}
1382
-
1382
+
1383
1383
state -> content_length -= avail ;
1384
1384
return s_n_llhttp__internal__n_consume_content_length_1 ;
1385
1385
/* UNREACHABLE */ ;
@@ -1595,7 +1595,7 @@ static llparse_state_t llhttp__internal__run(
1595
1595
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1596
1596
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1597
1597
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1598
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
1598
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
1599
1599
};
1600
1600
if (p == endp ) {
1601
1601
return s_n_llhttp__internal__n_header_value_connection_token ;
@@ -1646,7 +1646,7 @@ static llparse_state_t llhttp__internal__run(
1646
1646
case s_n_llhttp__internal__n_header_value_connection_1 :
1647
1647
s_n_llhttp__internal__n_header_value_connection_1 : {
1648
1648
llparse_match_t match_seq ;
1649
-
1649
+
1650
1650
if (p == endp ) {
1651
1651
return s_n_llhttp__internal__n_header_value_connection_1 ;
1652
1652
}
@@ -1670,7 +1670,7 @@ static llparse_state_t llhttp__internal__run(
1670
1670
case s_n_llhttp__internal__n_header_value_connection_2 :
1671
1671
s_n_llhttp__internal__n_header_value_connection_2 : {
1672
1672
llparse_match_t match_seq ;
1673
-
1673
+
1674
1674
if (p == endp ) {
1675
1675
return s_n_llhttp__internal__n_header_value_connection_2 ;
1676
1676
}
@@ -1694,7 +1694,7 @@ static llparse_state_t llhttp__internal__run(
1694
1694
case s_n_llhttp__internal__n_header_value_connection_3 :
1695
1695
s_n_llhttp__internal__n_header_value_connection_3 : {
1696
1696
llparse_match_t match_seq ;
1697
-
1697
+
1698
1698
if (p == endp ) {
1699
1699
return s_n_llhttp__internal__n_header_value_connection_3 ;
1700
1700
}
@@ -1916,7 +1916,7 @@ static llparse_state_t llhttp__internal__run(
1916
1916
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1917
1917
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1918
1918
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1919
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
1919
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
1920
1920
};
1921
1921
if (p == endp ) {
1922
1922
return s_n_llhttp__internal__n_header_value ;
@@ -1927,17 +1927,17 @@ static llparse_state_t llhttp__internal__run(
1927
1927
__m128i input ;
1928
1928
int avail ;
1929
1929
int match_len ;
1930
-
1930
+
1931
1931
/* Load input */
1932
1932
input = _mm_loadu_si128 ((__m128i const * ) p );
1933
1933
ranges = _mm_loadu_si128 ((__m128i const * ) llparse_blob8 );
1934
-
1934
+
1935
1935
/* Find first character that does not match `ranges` */
1936
1936
match_len = _mm_cmpestri (ranges , 6 ,
1937
1937
input , 16 ,
1938
1938
_SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
1939
1939
_SIDD_NEGATIVE_POLARITY );
1940
-
1940
+
1941
1941
if (match_len != 0 ) {
1942
1942
p += match_len ;
1943
1943
goto s_n_llhttp__internal__n_header_value ;
@@ -1975,7 +1975,7 @@ static llparse_state_t llhttp__internal__run(
1975
1975
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1976
1976
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1977
1977
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
1978
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
1978
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
1979
1979
};
1980
1980
if (p == endp ) {
1981
1981
return s_n_llhttp__internal__n_header_value_te_token ;
@@ -1999,7 +1999,7 @@ static llparse_state_t llhttp__internal__run(
1999
1999
case s_n_llhttp__internal__n_header_value_te_chunked :
2000
2000
s_n_llhttp__internal__n_header_value_te_chunked : {
2001
2001
llparse_match_t match_seq ;
2002
-
2002
+
2003
2003
if (p == endp ) {
2004
2004
return s_n_llhttp__internal__n_header_value_te_chunked ;
2005
2005
}
@@ -2105,29 +2105,29 @@ static llparse_state_t llhttp__internal__run(
2105
2105
__m128i input ;
2106
2106
int avail ;
2107
2107
int match_len ;
2108
-
2108
+
2109
2109
/* Load input */
2110
2110
input = _mm_loadu_si128 ((__m128i const * ) p );
2111
2111
ranges = _mm_loadu_si128 ((__m128i const * ) llparse_blob9 );
2112
-
2112
+
2113
2113
/* Find first character that does not match `ranges` */
2114
2114
match_len = _mm_cmpestri (ranges , 16 ,
2115
2115
input , 16 ,
2116
2116
_SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2117
2117
_SIDD_NEGATIVE_POLARITY );
2118
-
2118
+
2119
2119
if (match_len != 0 ) {
2120
2120
p += match_len ;
2121
2121
goto s_n_llhttp__internal__n_header_field_general ;
2122
2122
}
2123
2123
ranges = _mm_loadu_si128 ((__m128i const * ) llparse_blob10 );
2124
-
2124
+
2125
2125
/* Find first character that does not match `ranges` */
2126
2126
match_len = _mm_cmpestri (ranges , 2 ,
2127
2127
input , 16 ,
2128
2128
_SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2129
2129
_SIDD_NEGATIVE_POLARITY );
2130
-
2130
+
2131
2131
if (match_len != 0 ) {
2132
2132
p += match_len ;
2133
2133
goto s_n_llhttp__internal__n_header_field_general ;
@@ -2170,7 +2170,7 @@ static llparse_state_t llhttp__internal__run(
2170
2170
case s_n_llhttp__internal__n_header_field_3 :
2171
2171
s_n_llhttp__internal__n_header_field_3 : {
2172
2172
llparse_match_t match_seq ;
2173
-
2173
+
2174
2174
if (p == endp ) {
2175
2175
return s_n_llhttp__internal__n_header_field_3 ;
2176
2176
}
@@ -2195,7 +2195,7 @@ static llparse_state_t llhttp__internal__run(
2195
2195
case s_n_llhttp__internal__n_header_field_4 :
2196
2196
s_n_llhttp__internal__n_header_field_4 : {
2197
2197
llparse_match_t match_seq ;
2198
-
2198
+
2199
2199
if (p == endp ) {
2200
2200
return s_n_llhttp__internal__n_header_field_4 ;
2201
2201
}
@@ -2241,7 +2241,7 @@ static llparse_state_t llhttp__internal__run(
2241
2241
case s_n_llhttp__internal__n_header_field_1 :
2242
2242
s_n_llhttp__internal__n_header_field_1 : {
2243
2243
llparse_match_t match_seq ;
2244
-
2244
+
2245
2245
if (p == endp ) {
2246
2246
return s_n_llhttp__internal__n_header_field_1 ;
2247
2247
}
@@ -2265,7 +2265,7 @@ static llparse_state_t llhttp__internal__run(
2265
2265
case s_n_llhttp__internal__n_header_field_5 :
2266
2266
s_n_llhttp__internal__n_header_field_5 : {
2267
2267
llparse_match_t match_seq ;
2268
-
2268
+
2269
2269
if (p == endp ) {
2270
2270
return s_n_llhttp__internal__n_header_field_5 ;
2271
2271
}
@@ -2290,7 +2290,7 @@ static llparse_state_t llhttp__internal__run(
2290
2290
case s_n_llhttp__internal__n_header_field_6 :
2291
2291
s_n_llhttp__internal__n_header_field_6 : {
2292
2292
llparse_match_t match_seq ;
2293
-
2293
+
2294
2294
if (p == endp ) {
2295
2295
return s_n_llhttp__internal__n_header_field_6 ;
2296
2296
}
@@ -2315,7 +2315,7 @@ static llparse_state_t llhttp__internal__run(
2315
2315
case s_n_llhttp__internal__n_header_field_7 :
2316
2316
s_n_llhttp__internal__n_header_field_7 : {
2317
2317
llparse_match_t match_seq ;
2318
-
2318
+
2319
2319
if (p == endp ) {
2320
2320
return s_n_llhttp__internal__n_header_field_7 ;
2321
2321
}
@@ -2666,7 +2666,7 @@ static llparse_state_t llhttp__internal__run(
2666
2666
case s_n_llhttp__internal__n_req_http_start_1 :
2667
2667
s_n_llhttp__internal__n_req_http_start_1 : {
2668
2668
llparse_match_t match_seq ;
2669
-
2669
+
2670
2670
if (p == endp ) {
2671
2671
return s_n_llhttp__internal__n_req_http_start_1 ;
2672
2672
}
@@ -2690,7 +2690,7 @@ static llparse_state_t llhttp__internal__run(
2690
2690
case s_n_llhttp__internal__n_req_http_start_2 :
2691
2691
s_n_llhttp__internal__n_req_http_start_2 : {
2692
2692
llparse_match_t match_seq ;
2693
-
2693
+
2694
2694
if (p == endp ) {
2695
2695
return s_n_llhttp__internal__n_req_http_start_2 ;
2696
2696
}
@@ -3369,7 +3369,7 @@ static llparse_state_t llhttp__internal__run(
3369
3369
case s_n_llhttp__internal__n_start_req_1 :
3370
3370
s_n_llhttp__internal__n_start_req_1 : {
3371
3371
llparse_match_t match_seq ;
3372
-
3372
+
3373
3373
if (p == endp ) {
3374
3374
return s_n_llhttp__internal__n_start_req_1 ;
3375
3375
}
@@ -3394,7 +3394,7 @@ static llparse_state_t llhttp__internal__run(
3394
3394
case s_n_llhttp__internal__n_start_req_2 :
3395
3395
s_n_llhttp__internal__n_start_req_2 : {
3396
3396
llparse_match_t match_seq ;
3397
-
3397
+
3398
3398
if (p == endp ) {
3399
3399
return s_n_llhttp__internal__n_start_req_2 ;
3400
3400
}
@@ -3419,7 +3419,7 @@ static llparse_state_t llhttp__internal__run(
3419
3419
case s_n_llhttp__internal__n_start_req_4 :
3420
3420
s_n_llhttp__internal__n_start_req_4 : {
3421
3421
llparse_match_t match_seq ;
3422
-
3422
+
3423
3423
if (p == endp ) {
3424
3424
return s_n_llhttp__internal__n_start_req_4 ;
3425
3425
}
@@ -3444,7 +3444,7 @@ static llparse_state_t llhttp__internal__run(
3444
3444
case s_n_llhttp__internal__n_start_req_6 :
3445
3445
s_n_llhttp__internal__n_start_req_6 : {
3446
3446
llparse_match_t match_seq ;
3447
-
3447
+
3448
3448
if (p == endp ) {
3449
3449
return s_n_llhttp__internal__n_start_req_6 ;
3450
3450
}
@@ -3529,7 +3529,7 @@ static llparse_state_t llhttp__internal__run(
3529
3529
case s_n_llhttp__internal__n_start_req_8 :
3530
3530
s_n_llhttp__internal__n_start_req_8 : {
3531
3531
llparse_match_t match_seq ;
3532
-
3532
+
3533
3533
if (p == endp ) {
3534
3534
return s_n_llhttp__internal__n_start_req_8 ;
3535
3535
}
@@ -3554,7 +3554,7 @@ static llparse_state_t llhttp__internal__run(
3554
3554
case s_n_llhttp__internal__n_start_req_9 :
3555
3555
s_n_llhttp__internal__n_start_req_9 : {
3556
3556
llparse_match_t match_seq ;
3557
-
3557
+
3558
3558
if (p == endp ) {
3559
3559
return s_n_llhttp__internal__n_start_req_9 ;
3560
3560
}
@@ -3579,7 +3579,7 @@ static llparse_state_t llhttp__internal__run(
3579
3579
case s_n_llhttp__internal__n_start_req_10 :
3580
3580
s_n_llhttp__internal__n_start_req_10 : {
3581
3581
llparse_match_t match_seq ;
3582
-
3582
+
3583
3583
if (p == endp ) {
3584
3584
return s_n_llhttp__internal__n_start_req_10 ;
3585
3585
}
@@ -3604,7 +3604,7 @@ static llparse_state_t llhttp__internal__run(
3604
3604
case s_n_llhttp__internal__n_start_req_12 :
3605
3605
s_n_llhttp__internal__n_start_req_12 : {
3606
3606
llparse_match_t match_seq ;
3607
-
3607
+
3608
3608
if (p == endp ) {
3609
3609
return s_n_llhttp__internal__n_start_req_12 ;
3610
3610
}
@@ -3629,7 +3629,7 @@ static llparse_state_t llhttp__internal__run(
3629
3629
case s_n_llhttp__internal__n_start_req_13 :
3630
3630
s_n_llhttp__internal__n_start_req_13 : {
3631
3631
llparse_match_t match_seq ;
3632
-
3632
+
3633
3633
if (p == endp ) {
3634
3634
return s_n_llhttp__internal__n_start_req_13 ;
3635
3635
}
@@ -3675,7 +3675,7 @@ static llparse_state_t llhttp__internal__run(
3675
3675
case s_n_llhttp__internal__n_start_req_15 :
3676
3676
s_n_llhttp__internal__n_start_req_15 : {
3677
3677
llparse_match_t match_seq ;
3678
-
3678
+
3679
3679
if (p == endp ) {
3680
3680
return s_n_llhttp__internal__n_start_req_15 ;
3681
3681
}
@@ -3700,7 +3700,7 @@ static llparse_state_t llhttp__internal__run(
3700
3700
case s_n_llhttp__internal__n_start_req_16 :
3701
3701
s_n_llhttp__internal__n_start_req_16 : {
3702
3702
llparse_match_t match_seq ;
3703
-
3703
+
3704
3704
if (p == endp ) {
3705
3705
return s_n_llhttp__internal__n_start_req_16 ;
3706
3706
}
@@ -3725,7 +3725,7 @@ static llparse_state_t llhttp__internal__run(
3725
3725
case s_n_llhttp__internal__n_start_req_18 :
3726
3726
s_n_llhttp__internal__n_start_req_18 : {
3727
3727
llparse_match_t match_seq ;
3728
-
3728
+
3729
3729
if (p == endp ) {
3730
3730
return s_n_llhttp__internal__n_start_req_18 ;
3731
3731
}
@@ -3750,7 +3750,7 @@ static llparse_state_t llhttp__internal__run(
3750
3750
case s_n_llhttp__internal__n_start_req_20 :
3751
3751
s_n_llhttp__internal__n_start_req_20 : {
3752
3752
llparse_match_t match_seq ;
3753
-
3753
+
3754
3754
if (p == endp ) {
3755
3755
return s_n_llhttp__internal__n_start_req_20 ;
3756
3756
}
@@ -3835,7 +3835,7 @@ static llparse_state_t llhttp__internal__run(
3835
3835
case s_n_llhttp__internal__n_start_req_22 :
3836
3836
s_n_llhttp__internal__n_start_req_22 : {
3837
3837
llparse_match_t match_seq ;
3838
-
3838
+
3839
3839
if (p == endp ) {
3840
3840
return s_n_llhttp__internal__n_start_req_22 ;
3841
3841
}
@@ -3889,7 +3889,7 @@ static llparse_state_t llhttp__internal__run(
3889
3889
case s_n_llhttp__internal__n_start_req_23 :
3890
3890
s_n_llhttp__internal__n_start_req_23 : {
3891
3891
llparse_match_t match_seq ;
3892
-
3892
+
3893
3893
if (p == endp ) {
3894
3894
return s_n_llhttp__internal__n_start_req_23 ;
3895
3895
}
@@ -3914,7 +3914,7 @@ static llparse_state_t llhttp__internal__run(
3914
3914
case s_n_llhttp__internal__n_start_req_24 :
3915
3915
s_n_llhttp__internal__n_start_req_24 : {
3916
3916
llparse_match_t match_seq ;
3917
-
3917
+
3918
3918
if (p == endp ) {
3919
3919
return s_n_llhttp__internal__n_start_req_24 ;
3920
3920
}
@@ -3939,7 +3939,7 @@ static llparse_state_t llhttp__internal__run(
3939
3939
case s_n_llhttp__internal__n_start_req_26 :
3940
3940
s_n_llhttp__internal__n_start_req_26 : {
3941
3941
llparse_match_t match_seq ;
3942
-
3942
+
3943
3943
if (p == endp ) {
3944
3944
return s_n_llhttp__internal__n_start_req_26 ;
3945
3945
}
@@ -3964,7 +3964,7 @@ static llparse_state_t llhttp__internal__run(
3964
3964
case s_n_llhttp__internal__n_start_req_27 :
3965
3965
s_n_llhttp__internal__n_start_req_27 : {
3966
3966
llparse_match_t match_seq ;
3967
-
3967
+
3968
3968
if (p == endp ) {
3969
3969
return s_n_llhttp__internal__n_start_req_27 ;
3970
3970
}
@@ -3989,7 +3989,7 @@ static llparse_state_t llhttp__internal__run(
3989
3989
case s_n_llhttp__internal__n_start_req_31 :
3990
3990
s_n_llhttp__internal__n_start_req_31 : {
3991
3991
llparse_match_t match_seq ;
3992
-
3992
+
3993
3993
if (p == endp ) {
3994
3994
return s_n_llhttp__internal__n_start_req_31 ;
3995
3995
}
@@ -4014,7 +4014,7 @@ static llparse_state_t llhttp__internal__run(
4014
4014
case s_n_llhttp__internal__n_start_req_32 :
4015
4015
s_n_llhttp__internal__n_start_req_32 : {
4016
4016
llparse_match_t match_seq ;
4017
-
4017
+
4018
4018
if (p == endp ) {
4019
4019
return s_n_llhttp__internal__n_start_req_32 ;
4020
4020
}
@@ -4099,7 +4099,7 @@ static llparse_state_t llhttp__internal__run(
4099
4099
case s_n_llhttp__internal__n_start_req_34 :
4100
4100
s_n_llhttp__internal__n_start_req_34 : {
4101
4101
llparse_match_t match_seq ;
4102
-
4102
+
4103
4103
if (p == endp ) {
4104
4104
return s_n_llhttp__internal__n_start_req_34 ;
4105
4105
}
@@ -4175,7 +4175,7 @@ static llparse_state_t llhttp__internal__run(
4175
4175
case s_n_llhttp__internal__n_start_req_37 :
4176
4176
s_n_llhttp__internal__n_start_req_37 : {
4177
4177
llparse_match_t match_seq ;
4178
-
4178
+
4179
4179
if (p == endp ) {
4180
4180
return s_n_llhttp__internal__n_start_req_37 ;
4181
4181
}
@@ -4200,7 +4200,7 @@ static llparse_state_t llhttp__internal__run(
4200
4200
case s_n_llhttp__internal__n_start_req_38 :
4201
4201
s_n_llhttp__internal__n_start_req_38 : {
4202
4202
llparse_match_t match_seq ;
4203
-
4203
+
4204
4204
if (p == endp ) {
4205
4205
return s_n_llhttp__internal__n_start_req_38 ;
4206
4206
}
@@ -4263,7 +4263,7 @@ static llparse_state_t llhttp__internal__run(
4263
4263
case s_n_llhttp__internal__n_start_req_40 :
4264
4264
s_n_llhttp__internal__n_start_req_40 : {
4265
4265
llparse_match_t match_seq ;
4266
-
4266
+
4267
4267
if (p == endp ) {
4268
4268
return s_n_llhttp__internal__n_start_req_40 ;
4269
4269
}
@@ -4288,7 +4288,7 @@ static llparse_state_t llhttp__internal__run(
4288
4288
case s_n_llhttp__internal__n_start_req_41 :
4289
4289
s_n_llhttp__internal__n_start_req_41 : {
4290
4290
llparse_match_t match_seq ;
4291
-
4291
+
4292
4292
if (p == endp ) {
4293
4293
return s_n_llhttp__internal__n_start_req_41 ;
4294
4294
}
@@ -4313,7 +4313,7 @@ static llparse_state_t llhttp__internal__run(
4313
4313
case s_n_llhttp__internal__n_start_req_42 :
4314
4314
s_n_llhttp__internal__n_start_req_42 : {
4315
4315
llparse_match_t match_seq ;
4316
-
4316
+
4317
4317
if (p == endp ) {
4318
4318
return s_n_llhttp__internal__n_start_req_42 ;
4319
4319
}
@@ -4363,7 +4363,7 @@ static llparse_state_t llhttp__internal__run(
4363
4363
case s_n_llhttp__internal__n_start_req_43 :
4364
4364
s_n_llhttp__internal__n_start_req_43 : {
4365
4365
llparse_match_t match_seq ;
4366
-
4366
+
4367
4367
if (p == endp ) {
4368
4368
return s_n_llhttp__internal__n_start_req_43 ;
4369
4369
}
@@ -4388,7 +4388,7 @@ static llparse_state_t llhttp__internal__run(
4388
4388
case s_n_llhttp__internal__n_start_req_46 :
4389
4389
s_n_llhttp__internal__n_start_req_46 : {
4390
4390
llparse_match_t match_seq ;
4391
-
4391
+
4392
4392
if (p == endp ) {
4393
4393
return s_n_llhttp__internal__n_start_req_46 ;
4394
4394
}
@@ -4413,7 +4413,7 @@ static llparse_state_t llhttp__internal__run(
4413
4413
case s_n_llhttp__internal__n_start_req_48 :
4414
4414
s_n_llhttp__internal__n_start_req_48 : {
4415
4415
llparse_match_t match_seq ;
4416
-
4416
+
4417
4417
if (p == endp ) {
4418
4418
return s_n_llhttp__internal__n_start_req_48 ;
4419
4419
}
@@ -4438,7 +4438,7 @@ static llparse_state_t llhttp__internal__run(
4438
4438
case s_n_llhttp__internal__n_start_req_49 :
4439
4439
s_n_llhttp__internal__n_start_req_49 : {
4440
4440
llparse_match_t match_seq ;
4441
-
4441
+
4442
4442
if (p == endp ) {
4443
4443
return s_n_llhttp__internal__n_start_req_49 ;
4444
4444
}
@@ -4484,7 +4484,7 @@ static llparse_state_t llhttp__internal__run(
4484
4484
case s_n_llhttp__internal__n_start_req_50 :
4485
4485
s_n_llhttp__internal__n_start_req_50 : {
4486
4486
llparse_match_t match_seq ;
4487
-
4487
+
4488
4488
if (p == endp ) {
4489
4489
return s_n_llhttp__internal__n_start_req_50 ;
4490
4490
}
@@ -4939,7 +4939,7 @@ static llparse_state_t llhttp__internal__run(
4939
4939
case s_n_llhttp__internal__n_start_res :
4940
4940
s_n_llhttp__internal__n_start_res : {
4941
4941
llparse_match_t match_seq ;
4942
-
4942
+
4943
4943
if (p == endp ) {
4944
4944
return s_n_llhttp__internal__n_start_res ;
4945
4945
}
@@ -4963,7 +4963,7 @@ static llparse_state_t llhttp__internal__run(
4963
4963
case s_n_llhttp__internal__n_req_or_res_method_2 :
4964
4964
s_n_llhttp__internal__n_req_or_res_method_2 : {
4965
4965
llparse_match_t match_seq ;
4966
-
4966
+
4967
4967
if (p == endp ) {
4968
4968
return s_n_llhttp__internal__n_req_or_res_method_2 ;
4969
4969
}
@@ -4988,7 +4988,7 @@ static llparse_state_t llhttp__internal__run(
4988
4988
case s_n_llhttp__internal__n_req_or_res_method_3 :
4989
4989
s_n_llhttp__internal__n_req_or_res_method_3 : {
4990
4990
llparse_match_t match_seq ;
4991
-
4991
+
4992
4992
if (p == endp ) {
4993
4993
return s_n_llhttp__internal__n_req_or_res_method_3 ;
4994
4994
}
@@ -5291,7 +5291,7 @@ static llparse_state_t llhttp__internal__run(
5291
5291
s_n_llhttp__internal__n_span_end_llhttp__on_body : {
5292
5292
const unsigned char * start ;
5293
5293
int err ;
5294
-
5294
+
5295
5295
start = state -> _span_pos0 ;
5296
5296
state -> _span_pos0 = NULL ;
5297
5297
err = llhttp__on_body (state , start , p );
@@ -5383,7 +5383,7 @@ static llparse_state_t llhttp__internal__run(
5383
5383
s_n_llhttp__internal__n_span_end_llhttp__on_body_1 : {
5384
5384
const unsigned char * start ;
5385
5385
int err ;
5386
-
5386
+
5387
5387
start = state -> _span_pos0 ;
5388
5388
state -> _span_pos0 = NULL ;
5389
5389
err = llhttp__on_body (state , start , p );
@@ -5573,7 +5573,7 @@ static llparse_state_t llhttp__internal__run(
5573
5573
s_n_llhttp__internal__n_span_end_llhttp__on_header_value : {
5574
5574
const unsigned char * start ;
5575
5575
int err ;
5576
-
5576
+
5577
5577
start = state -> _span_pos0 ;
5578
5578
state -> _span_pos0 = NULL ;
5579
5579
err = llhttp__on_header_value (state , start , p );
@@ -5730,7 +5730,7 @@ static llparse_state_t llhttp__internal__run(
5730
5730
s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1 : {
5731
5731
const unsigned char * start ;
5732
5732
int err ;
5733
-
5733
+
5734
5734
start = state -> _span_pos0 ;
5735
5735
state -> _span_pos0 = NULL ;
5736
5736
err = llhttp__on_header_value (state , start , p );
@@ -5747,7 +5747,7 @@ static llparse_state_t llhttp__internal__run(
5747
5747
s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2 : {
5748
5748
const unsigned char * start ;
5749
5749
int err ;
5750
-
5750
+
5751
5751
start = state -> _span_pos0 ;
5752
5752
state -> _span_pos0 = NULL ;
5753
5753
err = llhttp__on_header_value (state , start , p );
@@ -5765,7 +5765,7 @@ static llparse_state_t llhttp__internal__run(
5765
5765
s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3 : {
5766
5766
const unsigned char * start ;
5767
5767
int err ;
5768
-
5768
+
5769
5769
start = state -> _span_pos0 ;
5770
5770
state -> _span_pos0 = NULL ;
5771
5771
err = llhttp__on_header_value (state , start , p );
@@ -5890,7 +5890,7 @@ static llparse_state_t llhttp__internal__run(
5890
5890
s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4 : {
5891
5891
const unsigned char * start ;
5892
5892
int err ;
5893
-
5893
+
5894
5894
start = state -> _span_pos0 ;
5895
5895
state -> _span_pos0 = NULL ;
5896
5896
err = llhttp__on_header_value (state , start , p );
@@ -5925,7 +5925,7 @@ static llparse_state_t llhttp__internal__run(
5925
5925
s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5 : {
5926
5926
const unsigned char * start ;
5927
5927
int err ;
5928
-
5928
+
5929
5929
start = state -> _span_pos0 ;
5930
5930
state -> _span_pos0 = NULL ;
5931
5931
err = llhttp__on_header_value (state , start , p );
@@ -6009,7 +6009,7 @@ static llparse_state_t llhttp__internal__run(
6009
6009
s_n_llhttp__internal__n_span_end_llhttp__on_header_field : {
6010
6010
const unsigned char * start ;
6011
6011
int err ;
6012
-
6012
+
6013
6013
start = state -> _span_pos0 ;
6014
6014
state -> _span_pos0 = NULL ;
6015
6015
err = llhttp__on_header_field (state , start , p );
@@ -6027,7 +6027,7 @@ static llparse_state_t llhttp__internal__run(
6027
6027
s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1 : {
6028
6028
const unsigned char * start ;
6029
6029
int err ;
6030
-
6030
+
6031
6031
start = state -> _span_pos0 ;
6032
6032
state -> _span_pos0 = NULL ;
6033
6033
err = llhttp__on_header_field (state , start , p );
@@ -6094,7 +6094,7 @@ static llparse_state_t llhttp__internal__run(
6094
6094
s_n_llhttp__internal__n_span_end_llhttp__on_url_3 : {
6095
6095
const unsigned char * start ;
6096
6096
int err ;
6097
-
6097
+
6098
6098
start = state -> _span_pos0 ;
6099
6099
state -> _span_pos0 = NULL ;
6100
6100
err = llhttp__on_url (state , start , p );
@@ -6120,7 +6120,7 @@ static llparse_state_t llhttp__internal__run(
6120
6120
s_n_llhttp__internal__n_span_end_llhttp__on_url_4 : {
6121
6121
const unsigned char * start ;
6122
6122
int err ;
6123
-
6123
+
6124
6124
start = state -> _span_pos0 ;
6125
6125
state -> _span_pos0 = NULL ;
6126
6126
err = llhttp__on_url (state , start , p );
@@ -6217,7 +6217,7 @@ static llparse_state_t llhttp__internal__run(
6217
6217
s_n_llhttp__internal__n_span_end_llhttp__on_url_5 : {
6218
6218
const unsigned char * start ;
6219
6219
int err ;
6220
-
6220
+
6221
6221
start = state -> _span_pos0 ;
6222
6222
state -> _span_pos0 = NULL ;
6223
6223
err = llhttp__on_url (state , start , p );
@@ -6234,7 +6234,7 @@ static llparse_state_t llhttp__internal__run(
6234
6234
s_n_llhttp__internal__n_span_end_llhttp__on_url_6 : {
6235
6235
const unsigned char * start ;
6236
6236
int err ;
6237
-
6237
+
6238
6238
start = state -> _span_pos0 ;
6239
6239
state -> _span_pos0 = NULL ;
6240
6240
err = llhttp__on_url (state , start , p );
@@ -6251,7 +6251,7 @@ static llparse_state_t llhttp__internal__run(
6251
6251
s_n_llhttp__internal__n_span_end_llhttp__on_url_7 : {
6252
6252
const unsigned char * start ;
6253
6253
int err ;
6254
-
6254
+
6255
6255
start = state -> _span_pos0 ;
6256
6256
state -> _span_pos0 = NULL ;
6257
6257
err = llhttp__on_url (state , start , p );
@@ -6268,7 +6268,7 @@ static llparse_state_t llhttp__internal__run(
6268
6268
s_n_llhttp__internal__n_span_end_llhttp__on_url_8 : {
6269
6269
const unsigned char * start ;
6270
6270
int err ;
6271
-
6271
+
6272
6272
start = state -> _span_pos0 ;
6273
6273
state -> _span_pos0 = NULL ;
6274
6274
err = llhttp__on_url (state , start , p );
@@ -6294,7 +6294,7 @@ static llparse_state_t llhttp__internal__run(
6294
6294
s_n_llhttp__internal__n_span_end_llhttp__on_url_9 : {
6295
6295
const unsigned char * start ;
6296
6296
int err ;
6297
-
6297
+
6298
6298
start = state -> _span_pos0 ;
6299
6299
state -> _span_pos0 = NULL ;
6300
6300
err = llhttp__on_url (state , start , p );
@@ -6311,7 +6311,7 @@ static llparse_state_t llhttp__internal__run(
6311
6311
s_n_llhttp__internal__n_span_end_llhttp__on_url_10 : {
6312
6312
const unsigned char * start ;
6313
6313
int err ;
6314
-
6314
+
6315
6315
start = state -> _span_pos0 ;
6316
6316
state -> _span_pos0 = NULL ;
6317
6317
err = llhttp__on_url (state , start , p );
@@ -6328,7 +6328,7 @@ static llparse_state_t llhttp__internal__run(
6328
6328
s_n_llhttp__internal__n_span_end_llhttp__on_url_11 : {
6329
6329
const unsigned char * start ;
6330
6330
int err ;
6331
-
6331
+
6332
6332
start = state -> _span_pos0 ;
6333
6333
state -> _span_pos0 = NULL ;
6334
6334
err = llhttp__on_url (state , start , p );
@@ -6363,7 +6363,7 @@ static llparse_state_t llhttp__internal__run(
6363
6363
s_n_llhttp__internal__n_span_end_llhttp__on_url : {
6364
6364
const unsigned char * start ;
6365
6365
int err ;
6366
-
6366
+
6367
6367
start = state -> _span_pos0 ;
6368
6368
state -> _span_pos0 = NULL ;
6369
6369
err = llhttp__on_url (state , start , p );
@@ -6380,7 +6380,7 @@ static llparse_state_t llhttp__internal__run(
6380
6380
s_n_llhttp__internal__n_span_end_llhttp__on_url_1 : {
6381
6381
const unsigned char * start ;
6382
6382
int err ;
6383
-
6383
+
6384
6384
start = state -> _span_pos0 ;
6385
6385
state -> _span_pos0 = NULL ;
6386
6386
err = llhttp__on_url (state , start , p );
@@ -6397,7 +6397,7 @@ static llparse_state_t llhttp__internal__run(
6397
6397
s_n_llhttp__internal__n_span_end_llhttp__on_url_2 : {
6398
6398
const unsigned char * start ;
6399
6399
int err ;
6400
-
6400
+
6401
6401
start = state -> _span_pos0 ;
6402
6402
state -> _span_pos0 = NULL ;
6403
6403
err = llhttp__on_url (state , start , p );
@@ -6414,7 +6414,7 @@ static llparse_state_t llhttp__internal__run(
6414
6414
s_n_llhttp__internal__n_span_end_llhttp__on_url_12 : {
6415
6415
const unsigned char * start ;
6416
6416
int err ;
6417
-
6417
+
6418
6418
start = state -> _span_pos0 ;
6419
6419
state -> _span_pos0 = NULL ;
6420
6420
err = llhttp__on_url (state , start , p );
@@ -6431,7 +6431,7 @@ static llparse_state_t llhttp__internal__run(
6431
6431
s_n_llhttp__internal__n_span_end_llhttp__on_url_13 : {
6432
6432
const unsigned char * start ;
6433
6433
int err ;
6434
-
6434
+
6435
6435
start = state -> _span_pos0 ;
6436
6436
state -> _span_pos0 = NULL ;
6437
6437
err = llhttp__on_url (state , start , p );
@@ -6448,7 +6448,7 @@ static llparse_state_t llhttp__internal__run(
6448
6448
s_n_llhttp__internal__n_span_end_llhttp__on_url_14 : {
6449
6449
const unsigned char * start ;
6450
6450
int err ;
6451
-
6451
+
6452
6452
start = state -> _span_pos0 ;
6453
6453
state -> _span_pos0 = NULL ;
6454
6454
err = llhttp__on_url (state , start , p );
@@ -6583,7 +6583,7 @@ static llparse_state_t llhttp__internal__run(
6583
6583
s_n_llhttp__internal__n_span_end_llhttp__on_status : {
6584
6584
const unsigned char * start ;
6585
6585
int err ;
6586
-
6586
+
6587
6587
start = state -> _span_pos0 ;
6588
6588
state -> _span_pos0 = NULL ;
6589
6589
err = llhttp__on_status (state , start , p );
@@ -6601,7 +6601,7 @@ static llparse_state_t llhttp__internal__run(
6601
6601
s_n_llhttp__internal__n_span_end_llhttp__on_status_1 : {
6602
6602
const unsigned char * start ;
6603
6603
int err ;
6604
-
6604
+
6605
6605
start = state -> _span_pos0 ;
6606
6606
state -> _span_pos0 = NULL ;
6607
6607
err = llhttp__on_status (state , start , p );
@@ -6787,7 +6787,7 @@ int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const cha
6787
6787
if (state -> _span_pos0 != NULL ) {
6788
6788
state -> _span_pos0 = (void * ) p ;
6789
6789
}
6790
-
6790
+
6791
6791
next = llhttp__internal__run (state , (const unsigned char * ) p , (const unsigned char * ) endp );
6792
6792
if (next == s_error ) {
6793
6793
return state -> error ;
@@ -6797,15 +6797,15 @@ int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const cha
6797
6797
/* execute spans */
6798
6798
if (state -> _span_pos0 != NULL ) {
6799
6799
int error ;
6800
-
6800
+
6801
6801
error = ((llhttp__internal__span_cb ) state -> _span_cb0 )(state , state -> _span_pos0 , (const char * ) endp );
6802
6802
if (error != 0 ) {
6803
6803
state -> error = error ;
6804
6804
state -> error_pos = endp ;
6805
6805
return error ;
6806
6806
}
6807
6807
}
6808
-
6808
+
6809
6809
return 0 ;
6810
6810
}
6811
6811
@@ -6863,7 +6863,7 @@ static const unsigned char llparse_blob7[] = {
6863
6863
};
6864
6864
#ifdef __SSE4_2__
6865
6865
static const unsigned char ALIGN (16 ) llparse_blob8 [] = {
6866
- 0x9 , 0x9 , ' ' , '~' , 0x80 , 0xfe , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 ,
6866
+ 0x9 , 0x9 , ' ' , '~' , 0x80 , 0xff , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 ,
6867
6867
0x0 , 0x0 , 0x0 , 0x0 , 0x0
6868
6868
};
6869
6869
#endif /* __SSE4_2__ */
@@ -8358,7 +8358,7 @@ static llparse_state_t llhttp__internal__run(
8358
8358
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8359
8359
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8360
8360
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8361
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
8361
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
8362
8362
};
8363
8363
if (p == endp ) {
8364
8364
return s_n_llhttp__internal__n_header_value_connection_token ;
@@ -8679,7 +8679,7 @@ static llparse_state_t llhttp__internal__run(
8679
8679
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8680
8680
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8681
8681
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8682
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
8682
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
8683
8683
};
8684
8684
if (p == endp ) {
8685
8685
return s_n_llhttp__internal__n_header_value ;
@@ -8690,17 +8690,17 @@ static llparse_state_t llhttp__internal__run(
8690
8690
__m128i input ;
8691
8691
int avail ;
8692
8692
int match_len ;
8693
-
8693
+
8694
8694
/* Load input */
8695
8695
input = _mm_loadu_si128 ((__m128i const * ) p );
8696
8696
ranges = _mm_loadu_si128 ((__m128i const * ) llparse_blob8 );
8697
-
8697
+
8698
8698
/* Find first character that does not match `ranges` */
8699
8699
match_len = _mm_cmpestri (ranges , 6 ,
8700
8700
input , 16 ,
8701
8701
_SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
8702
8702
_SIDD_NEGATIVE_POLARITY );
8703
-
8703
+
8704
8704
if (match_len != 0 ) {
8705
8705
p += match_len ;
8706
8706
goto s_n_llhttp__internal__n_header_value ;
@@ -8738,7 +8738,7 @@ static llparse_state_t llhttp__internal__run(
8738
8738
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8739
8739
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8740
8740
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
8741
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
8741
+ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
8742
8742
};
8743
8743
if (p == endp ) {
8744
8744
return s_n_llhttp__internal__n_header_value_te_token ;
@@ -8762,7 +8762,7 @@ static llparse_state_t llhttp__internal__run(
8762
8762
case s_n_llhttp__internal__n_header_value_te_chunked :
8763
8763
s_n_llhttp__internal__n_header_value_te_chunked : {
8764
8764
llparse_match_t match_seq ;
8765
-
8765
+
8766
8766
if (p == endp ) {
8767
8767
return s_n_llhttp__internal__n_header_value_te_chunked ;
8768
8768
}
0 commit comments