thin 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 13c2ffd42a7cc07c94af330e3582c7e374237996
4
+ data.tar.gz: 1bb300ea5acc2f29b7cbbaed31d82d8cb8c2f982
5
+ SHA512:
6
+ metadata.gz: 67e9807a927691ced178a91a30b31fd12d783447e030d05e4dd3883a9ce7c62e69a41544e95680d3ab149f4ba6f5be7d9f8d024d3687db73d67c0059ab188655
7
+ data.tar.gz: c5726af50de902ea517436fe3d1e04301a9de8b6e55e475912effdc6f04a269cc67c864ea5ea41348a4809b474a0861d94c2f38dc1e4e5566904fea94aedf5ce
data/CHANGELOG CHANGED
@@ -1,3 +1,14 @@
1
+ == 1.6.0 Greek Yogurt
2
+ * Accept absolute URL in request line, eg.: 'GET http://site.com/he/lo HTTP/1.1'.
3
+ * HEAD request no longer return a body in the response.
4
+ * No longer stop EventMachine's reactor loop unless it was started by Thin.
5
+ * Make request env keys upcasing locale-agnostic.
6
+ * Use Ruby's `Logger` for logging. [Akshay Moghe].
7
+ The logger can now be set using `Thin::Logging.logger=`.
8
+ Tracing of request is handled by a second logger, `Thin::Logging.trace_logger=`.
9
+ * Add --threadpool-size option to configure EM's thread pool size (default: 20).
10
+ * Pipelining is no longer supported.
11
+
1
12
  == 1.5.1 Straight Razor
2
13
  * Fix issue when running as another user/group without a PID file.
3
14
  * Allow overriding Connection & Server response headers.
@@ -24,17 +24,21 @@
24
24
  token = (ascii -- (CTL | tspecials));
25
25
 
26
26
  # URI schemes and absolute paths
27
- scheme = ( alpha | digit | "+" | "-" | "." )* ;
28
- absolute_uri = (scheme ":" (uchar | reserved )*);
27
+ scheme = ( "http"i ("s"i)? );
28
+ hostname = ((alnum | "-" | "." | "_")+ | ("[" (":" | xdigit)+ "]"));
29
+ host_with_port = (hostname (":" digit*)?);
30
+ userinfo = ((unreserved | escape | ";" | ":" | "&" | "=" | "+")+ "@")*;
29
31
 
30
32
  path = ( pchar+ ( "/" pchar* )* ) ;
31
33
  query = ( uchar | reserved )* %query_string ;
32
34
  param = ( pchar | "/" )* ;
33
35
  params = ( param ( ";" param )* ) ;
34
- rel_path = ( path? (";" params)? %request_path) ("?" %start_query query)?;
36
+ rel_path = (path? (";" params)? %request_path) ("?" %start_query query)?;
35
37
  absolute_path = ( "/"+ rel_path );
38
+ path_uri = absolute_path > mark %request_uri;
39
+ Absolute_URI = (scheme "://" userinfo host_with_port path_uri);
36
40
 
37
- Request_URI = ( "*" | absolute_uri | absolute_path ) >mark %request_uri;
41
+ Request_URI = ((absolute_path | "*") >mark %request_uri) | Absolute_URI;
38
42
  Fragment = ( uchar | reserved )* >mark %fragment;
39
43
  Method = ( upper | digit | safe ){1,20} >mark %request_method;
40
44
 
@@ -25,7 +25,7 @@
25
25
 
26
26
  #line 27 "parser.c"
27
27
  static const int http_parser_start = 1;
28
- static const int http_parser_first_final = 58;
28
+ static const int http_parser_first_final = 70;
29
29
  static const int http_parser_error = 0;
30
30
 
31
31
  static const int http_parser_en_main = 1;
@@ -65,7 +65,7 @@ size_t thin_http_parser_execute(http_parser *parser, const char *buffer, size_t
65
65
  pe = buffer+len;
66
66
 
67
67
  assert(*pe == '\0' && "pointer does not end on NUL");
68
- assert(pe - p == len - off && "pointers aren't same distance");
68
+ assert(pe - p == (long)(len - off) && "pointers aren't same distance");
69
69
 
70
70
 
71
71
 
@@ -103,17 +103,17 @@ case 2:
103
103
  #line 104 "parser.c"
104
104
  switch( (*p) ) {
105
105
  case 32: goto tr2;
106
- case 36: goto st39;
107
- case 95: goto st39;
106
+ case 36: goto st51;
107
+ case 95: goto st51;
108
108
  }
109
109
  if ( (*p) < 48 ) {
110
110
  if ( 45 <= (*p) && (*p) <= 46 )
111
- goto st39;
111
+ goto st51;
112
112
  } else if ( (*p) > 57 ) {
113
113
  if ( 65 <= (*p) && (*p) <= 90 )
114
- goto st39;
114
+ goto st51;
115
115
  } else
116
- goto st39;
116
+ goto st51;
117
117
  goto st0;
118
118
  tr2:
119
119
  #line 36 "parser.rl"
@@ -130,18 +130,10 @@ case 3:
130
130
  #line 131 "parser.c"
131
131
  switch( (*p) ) {
132
132
  case 42: goto tr4;
133
- case 43: goto tr5;
134
- case 47: goto tr6;
135
- case 58: goto tr7;
133
+ case 47: goto tr5;
134
+ case 72: goto st34;
135
+ case 104: goto st34;
136
136
  }
137
- if ( (*p) < 65 ) {
138
- if ( 45 <= (*p) && (*p) <= 57 )
139
- goto tr5;
140
- } else if ( (*p) > 90 ) {
141
- if ( 97 <= (*p) && (*p) <= 122 )
142
- goto tr5;
143
- } else
144
- goto tr5;
145
137
  goto st0;
146
138
  tr4:
147
139
  #line 22 "parser.rl"
@@ -151,13 +143,13 @@ st4:
151
143
  if ( ++p == pe )
152
144
  goto _test_eof4;
153
145
  case 4:
154
- #line 155 "parser.c"
146
+ #line 147 "parser.c"
155
147
  switch( (*p) ) {
156
- case 32: goto tr8;
157
- case 35: goto tr9;
148
+ case 32: goto tr7;
149
+ case 35: goto tr8;
158
150
  }
159
151
  goto st0;
160
- tr8:
152
+ tr7:
161
153
  #line 41 "parser.rl"
162
154
  {
163
155
  if (parser->request_uri != NULL) {
@@ -165,7 +157,7 @@ tr8:
165
157
  }
166
158
  }
167
159
  goto st5;
168
- tr31:
160
+ tr30:
169
161
  #line 22 "parser.rl"
170
162
  {MARK(mark, p); }
171
163
  #line 46 "parser.rl"
@@ -175,7 +167,7 @@ tr31:
175
167
  }
176
168
  }
177
169
  goto st5;
178
- tr34:
170
+ tr33:
179
171
  #line 46 "parser.rl"
180
172
  {
181
173
  if (parser->fragment != NULL) {
@@ -183,7 +175,7 @@ tr34:
183
175
  }
184
176
  }
185
177
  goto st5;
186
- tr44:
178
+ tr38:
187
179
  #line 65 "parser.rl"
188
180
  {
189
181
  if (parser->request_path != NULL) {
@@ -197,7 +189,7 @@ tr44:
197
189
  }
198
190
  }
199
191
  goto st5;
200
- tr51:
192
+ tr45:
201
193
  #line 52 "parser.rl"
202
194
  {MARK(query_start, p); }
203
195
  #line 53 "parser.rl"
@@ -213,7 +205,7 @@ tr51:
213
205
  }
214
206
  }
215
207
  goto st5;
216
- tr55:
208
+ tr49:
217
209
  #line 53 "parser.rl"
218
210
  {
219
211
  if (parser->query_string != NULL) {
@@ -231,11 +223,11 @@ st5:
231
223
  if ( ++p == pe )
232
224
  goto _test_eof5;
233
225
  case 5:
234
- #line 235 "parser.c"
226
+ #line 227 "parser.c"
235
227
  if ( (*p) == 72 )
236
- goto tr10;
228
+ goto tr9;
237
229
  goto st0;
238
- tr10:
230
+ tr9:
239
231
  #line 22 "parser.rl"
240
232
  {MARK(mark, p); }
241
233
  goto st6;
@@ -243,7 +235,7 @@ st6:
243
235
  if ( ++p == pe )
244
236
  goto _test_eof6;
245
237
  case 6:
246
- #line 247 "parser.c"
238
+ #line 239 "parser.c"
247
239
  if ( (*p) == 84 )
248
240
  goto st7;
249
241
  goto st0;
@@ -296,11 +288,11 @@ st13:
296
288
  goto _test_eof13;
297
289
  case 13:
298
290
  if ( (*p) == 13 )
299
- goto tr18;
291
+ goto tr17;
300
292
  if ( 48 <= (*p) && (*p) <= 57 )
301
293
  goto st13;
302
294
  goto st0;
303
- tr18:
295
+ tr17:
304
296
  #line 59 "parser.rl"
305
297
  {
306
298
  if (parser->http_version != NULL) {
@@ -308,7 +300,7 @@ tr18:
308
300
  }
309
301
  }
310
302
  goto st14;
311
- tr26:
303
+ tr25:
312
304
  #line 30 "parser.rl"
313
305
  { MARK(mark, p); }
314
306
  #line 31 "parser.rl"
@@ -318,7 +310,7 @@ tr26:
318
310
  }
319
311
  }
320
312
  goto st14;
321
- tr29:
313
+ tr28:
322
314
  #line 31 "parser.rl"
323
315
  {
324
316
  if (parser->http_field != NULL) {
@@ -330,7 +322,7 @@ st14:
330
322
  if ( ++p == pe )
331
323
  goto _test_eof14;
332
324
  case 14:
333
- #line 334 "parser.c"
325
+ #line 326 "parser.c"
334
326
  if ( (*p) == 10 )
335
327
  goto st15;
336
328
  goto st0;
@@ -340,52 +332,52 @@ st15:
340
332
  case 15:
341
333
  switch( (*p) ) {
342
334
  case 13: goto st16;
343
- case 33: goto tr21;
344
- case 124: goto tr21;
345
- case 126: goto tr21;
335
+ case 33: goto tr20;
336
+ case 124: goto tr20;
337
+ case 126: goto tr20;
346
338
  }
347
339
  if ( (*p) < 45 ) {
348
340
  if ( (*p) > 39 ) {
349
341
  if ( 42 <= (*p) && (*p) <= 43 )
350
- goto tr21;
342
+ goto tr20;
351
343
  } else if ( (*p) >= 35 )
352
- goto tr21;
344
+ goto tr20;
353
345
  } else if ( (*p) > 46 ) {
354
346
  if ( (*p) < 65 ) {
355
347
  if ( 48 <= (*p) && (*p) <= 57 )
356
- goto tr21;
348
+ goto tr20;
357
349
  } else if ( (*p) > 90 ) {
358
350
  if ( 94 <= (*p) && (*p) <= 122 )
359
- goto tr21;
351
+ goto tr20;
360
352
  } else
361
- goto tr21;
353
+ goto tr20;
362
354
  } else
363
- goto tr21;
355
+ goto tr20;
364
356
  goto st0;
365
357
  st16:
366
358
  if ( ++p == pe )
367
359
  goto _test_eof16;
368
360
  case 16:
369
361
  if ( (*p) == 10 )
370
- goto tr22;
362
+ goto tr21;
371
363
  goto st0;
372
- tr22:
364
+ tr21:
373
365
  #line 71 "parser.rl"
374
366
  {
375
367
  parser->body_start = p - buffer + 1;
376
368
  if (parser->header_done != NULL) {
377
369
  parser->header_done(parser->data, p + 1, pe - p - 1);
378
370
  }
379
- {p++; cs = 58; goto _out;}
371
+ {p++; cs = 70; goto _out;}
380
372
  }
381
- goto st58;
382
- st58:
373
+ goto st70;
374
+ st70:
383
375
  if ( ++p == pe )
384
- goto _test_eof58;
385
- case 58:
386
- #line 387 "parser.c"
376
+ goto _test_eof70;
377
+ case 70:
378
+ #line 379 "parser.c"
387
379
  goto st0;
388
- tr21:
380
+ tr20:
389
381
  #line 25 "parser.rl"
390
382
  { MARK(field_start, p); }
391
383
  goto st17;
@@ -393,10 +385,10 @@ st17:
393
385
  if ( ++p == pe )
394
386
  goto _test_eof17;
395
387
  case 17:
396
- #line 397 "parser.c"
388
+ #line 389 "parser.c"
397
389
  switch( (*p) ) {
398
390
  case 33: goto st17;
399
- case 58: goto tr24;
391
+ case 58: goto tr23;
400
392
  case 124: goto st17;
401
393
  case 126: goto st17;
402
394
  }
@@ -418,13 +410,13 @@ case 17:
418
410
  } else
419
411
  goto st17;
420
412
  goto st0;
421
- tr24:
413
+ tr23:
422
414
  #line 26 "parser.rl"
423
415
  {
424
416
  parser->field_len = LEN(field_start, p);
425
417
  }
426
418
  goto st18;
427
- tr27:
419
+ tr26:
428
420
  #line 30 "parser.rl"
429
421
  { MARK(mark, p); }
430
422
  goto st18;
@@ -432,13 +424,13 @@ st18:
432
424
  if ( ++p == pe )
433
425
  goto _test_eof18;
434
426
  case 18:
435
- #line 436 "parser.c"
427
+ #line 428 "parser.c"
436
428
  switch( (*p) ) {
437
- case 13: goto tr26;
438
- case 32: goto tr27;
429
+ case 13: goto tr25;
430
+ case 32: goto tr26;
439
431
  }
440
- goto tr25;
441
- tr25:
432
+ goto tr24;
433
+ tr24:
442
434
  #line 30 "parser.rl"
443
435
  { MARK(mark, p); }
444
436
  goto st19;
@@ -446,11 +438,11 @@ st19:
446
438
  if ( ++p == pe )
447
439
  goto _test_eof19;
448
440
  case 19:
449
- #line 450 "parser.c"
441
+ #line 442 "parser.c"
450
442
  if ( (*p) == 13 )
451
- goto tr29;
443
+ goto tr28;
452
444
  goto st19;
453
- tr9:
445
+ tr8:
454
446
  #line 41 "parser.rl"
455
447
  {
456
448
  if (parser->request_uri != NULL) {
@@ -458,7 +450,7 @@ tr9:
458
450
  }
459
451
  }
460
452
  goto st20;
461
- tr45:
453
+ tr39:
462
454
  #line 65 "parser.rl"
463
455
  {
464
456
  if (parser->request_path != NULL) {
@@ -472,7 +464,7 @@ tr45:
472
464
  }
473
465
  }
474
466
  goto st20;
475
- tr52:
467
+ tr46:
476
468
  #line 52 "parser.rl"
477
469
  {MARK(query_start, p); }
478
470
  #line 53 "parser.rl"
@@ -488,7 +480,7 @@ tr52:
488
480
  }
489
481
  }
490
482
  goto st20;
491
- tr56:
483
+ tr50:
492
484
  #line 53 "parser.rl"
493
485
  {
494
486
  if (parser->query_string != NULL) {
@@ -506,17 +498,17 @@ st20:
506
498
  if ( ++p == pe )
507
499
  goto _test_eof20;
508
500
  case 20:
509
- #line 510 "parser.c"
501
+ #line 502 "parser.c"
510
502
  switch( (*p) ) {
511
- case 32: goto tr31;
503
+ case 32: goto tr30;
512
504
  case 35: goto st0;
513
- case 37: goto tr32;
505
+ case 37: goto tr31;
514
506
  case 127: goto st0;
515
507
  }
516
508
  if ( 0 <= (*p) && (*p) <= 31 )
517
509
  goto st0;
518
- goto tr30;
519
- tr30:
510
+ goto tr29;
511
+ tr29:
520
512
  #line 22 "parser.rl"
521
513
  {MARK(mark, p); }
522
514
  goto st21;
@@ -524,9 +516,9 @@ st21:
524
516
  if ( ++p == pe )
525
517
  goto _test_eof21;
526
518
  case 21:
527
- #line 528 "parser.c"
519
+ #line 520 "parser.c"
528
520
  switch( (*p) ) {
529
- case 32: goto tr34;
521
+ case 32: goto tr33;
530
522
  case 35: goto st0;
531
523
  case 37: goto st22;
532
524
  case 127: goto st0;
@@ -534,7 +526,7 @@ case 21:
534
526
  if ( 0 <= (*p) && (*p) <= 31 )
535
527
  goto st0;
536
528
  goto st21;
537
- tr32:
529
+ tr31:
538
530
  #line 22 "parser.rl"
539
531
  {MARK(mark, p); }
540
532
  goto st22;
@@ -542,7 +534,7 @@ st22:
542
534
  if ( ++p == pe )
543
535
  goto _test_eof22;
544
536
  case 22:
545
- #line 546 "parser.c"
537
+ #line 538 "parser.c"
546
538
  if ( (*p) == 117 )
547
539
  goto st24;
548
540
  if ( (*p) < 65 ) {
@@ -588,55 +580,44 @@ st25:
588
580
  if ( ++p == pe )
589
581
  goto _test_eof25;
590
582
  case 25:
591
- #line 592 "parser.c"
583
+ #line 584 "parser.c"
592
584
  switch( (*p) ) {
593
- case 43: goto st25;
594
- case 58: goto st26;
585
+ case 32: goto tr38;
586
+ case 35: goto tr39;
587
+ case 37: goto st26;
588
+ case 63: goto tr41;
589
+ case 127: goto st0;
595
590
  }
596
- if ( (*p) < 48 ) {
597
- if ( 45 <= (*p) && (*p) <= 46 )
598
- goto st25;
599
- } else if ( (*p) > 57 ) {
600
- if ( (*p) > 90 ) {
601
- if ( 97 <= (*p) && (*p) <= 122 )
602
- goto st25;
603
- } else if ( (*p) >= 65 )
604
- goto st25;
605
- } else
606
- goto st25;
607
- goto st0;
608
- tr7:
609
- #line 22 "parser.rl"
610
- {MARK(mark, p); }
611
- goto st26;
591
+ if ( 0 <= (*p) && (*p) <= 31 )
592
+ goto st0;
593
+ goto st25;
612
594
  st26:
613
595
  if ( ++p == pe )
614
596
  goto _test_eof26;
615
597
  case 26:
616
- #line 617 "parser.c"
617
- switch( (*p) ) {
618
- case 32: goto tr8;
619
- case 35: goto tr9;
620
- case 37: goto st27;
621
- case 127: goto st0;
622
- }
623
- if ( 0 <= (*p) && (*p) <= 31 )
624
- goto st0;
625
- goto st26;
598
+ if ( (*p) == 117 )
599
+ goto st28;
600
+ if ( (*p) < 65 ) {
601
+ if ( 48 <= (*p) && (*p) <= 57 )
602
+ goto st27;
603
+ } else if ( (*p) > 70 ) {
604
+ if ( 97 <= (*p) && (*p) <= 102 )
605
+ goto st27;
606
+ } else
607
+ goto st27;
608
+ goto st0;
626
609
  st27:
627
610
  if ( ++p == pe )
628
611
  goto _test_eof27;
629
612
  case 27:
630
- if ( (*p) == 117 )
631
- goto st29;
632
613
  if ( (*p) < 65 ) {
633
614
  if ( 48 <= (*p) && (*p) <= 57 )
634
- goto st28;
615
+ goto st25;
635
616
  } else if ( (*p) > 70 ) {
636
617
  if ( 97 <= (*p) && (*p) <= 102 )
637
- goto st28;
618
+ goto st25;
638
619
  } else
639
- goto st28;
620
+ goto st25;
640
621
  goto st0;
641
622
  st28:
642
623
  if ( ++p == pe )
@@ -644,49 +625,62 @@ st28:
644
625
  case 28:
645
626
  if ( (*p) < 65 ) {
646
627
  if ( 48 <= (*p) && (*p) <= 57 )
647
- goto st26;
628
+ goto st27;
648
629
  } else if ( (*p) > 70 ) {
649
630
  if ( 97 <= (*p) && (*p) <= 102 )
650
- goto st26;
631
+ goto st27;
651
632
  } else
652
- goto st26;
633
+ goto st27;
653
634
  goto st0;
635
+ tr41:
636
+ #line 65 "parser.rl"
637
+ {
638
+ if (parser->request_path != NULL) {
639
+ parser->request_path(parser->data, PTR_TO(mark), LEN(mark,p));
640
+ }
641
+ }
642
+ goto st29;
654
643
  st29:
655
644
  if ( ++p == pe )
656
645
  goto _test_eof29;
657
646
  case 29:
658
- if ( (*p) < 65 ) {
659
- if ( 48 <= (*p) && (*p) <= 57 )
660
- goto st28;
661
- } else if ( (*p) > 70 ) {
662
- if ( 97 <= (*p) && (*p) <= 102 )
663
- goto st28;
664
- } else
665
- goto st28;
666
- goto st0;
667
- tr6:
668
- #line 22 "parser.rl"
669
- {MARK(mark, p); }
647
+ #line 648 "parser.c"
648
+ switch( (*p) ) {
649
+ case 32: goto tr45;
650
+ case 35: goto tr46;
651
+ case 37: goto tr47;
652
+ case 127: goto st0;
653
+ }
654
+ if ( 0 <= (*p) && (*p) <= 31 )
655
+ goto st0;
656
+ goto tr44;
657
+ tr44:
658
+ #line 52 "parser.rl"
659
+ {MARK(query_start, p); }
670
660
  goto st30;
671
661
  st30:
672
662
  if ( ++p == pe )
673
663
  goto _test_eof30;
674
664
  case 30:
675
- #line 676 "parser.c"
665
+ #line 666 "parser.c"
676
666
  switch( (*p) ) {
677
- case 32: goto tr44;
678
- case 35: goto tr45;
667
+ case 32: goto tr49;
668
+ case 35: goto tr50;
679
669
  case 37: goto st31;
680
- case 63: goto tr47;
681
670
  case 127: goto st0;
682
671
  }
683
672
  if ( 0 <= (*p) && (*p) <= 31 )
684
673
  goto st0;
685
674
  goto st30;
675
+ tr47:
676
+ #line 52 "parser.rl"
677
+ {MARK(query_start, p); }
678
+ goto st31;
686
679
  st31:
687
680
  if ( ++p == pe )
688
681
  goto _test_eof31;
689
682
  case 31:
683
+ #line 684 "parser.c"
690
684
  if ( (*p) == 117 )
691
685
  goto st33;
692
686
  if ( (*p) < 65 ) {
@@ -724,108 +718,55 @@ case 33:
724
718
  } else
725
719
  goto st32;
726
720
  goto st0;
727
- tr47:
728
- #line 65 "parser.rl"
729
- {
730
- if (parser->request_path != NULL) {
731
- parser->request_path(parser->data, PTR_TO(mark), LEN(mark,p));
732
- }
733
- }
734
- goto st34;
735
721
  st34:
736
722
  if ( ++p == pe )
737
723
  goto _test_eof34;
738
724
  case 34:
739
- #line 740 "parser.c"
740
725
  switch( (*p) ) {
741
- case 32: goto tr51;
742
- case 35: goto tr52;
743
- case 37: goto tr53;
744
- case 127: goto st0;
726
+ case 84: goto st35;
727
+ case 116: goto st35;
745
728
  }
746
- if ( 0 <= (*p) && (*p) <= 31 )
747
- goto st0;
748
- goto tr50;
749
- tr50:
750
- #line 52 "parser.rl"
751
- {MARK(query_start, p); }
752
- goto st35;
729
+ goto st0;
753
730
  st35:
754
731
  if ( ++p == pe )
755
732
  goto _test_eof35;
756
733
  case 35:
757
- #line 758 "parser.c"
758
734
  switch( (*p) ) {
759
- case 32: goto tr55;
760
- case 35: goto tr56;
761
- case 37: goto st36;
762
- case 127: goto st0;
735
+ case 84: goto st36;
736
+ case 116: goto st36;
763
737
  }
764
- if ( 0 <= (*p) && (*p) <= 31 )
765
- goto st0;
766
- goto st35;
767
- tr53:
768
- #line 52 "parser.rl"
769
- {MARK(query_start, p); }
770
- goto st36;
738
+ goto st0;
771
739
  st36:
772
740
  if ( ++p == pe )
773
741
  goto _test_eof36;
774
742
  case 36:
775
- #line 776 "parser.c"
776
- if ( (*p) == 117 )
777
- goto st38;
778
- if ( (*p) < 65 ) {
779
- if ( 48 <= (*p) && (*p) <= 57 )
780
- goto st37;
781
- } else if ( (*p) > 70 ) {
782
- if ( 97 <= (*p) && (*p) <= 102 )
783
- goto st37;
784
- } else
785
- goto st37;
743
+ switch( (*p) ) {
744
+ case 80: goto st37;
745
+ case 112: goto st37;
746
+ }
786
747
  goto st0;
787
748
  st37:
788
749
  if ( ++p == pe )
789
750
  goto _test_eof37;
790
751
  case 37:
791
- if ( (*p) < 65 ) {
792
- if ( 48 <= (*p) && (*p) <= 57 )
793
- goto st35;
794
- } else if ( (*p) > 70 ) {
795
- if ( 97 <= (*p) && (*p) <= 102 )
796
- goto st35;
797
- } else
798
- goto st35;
752
+ switch( (*p) ) {
753
+ case 58: goto st38;
754
+ case 83: goto st50;
755
+ case 115: goto st50;
756
+ }
799
757
  goto st0;
800
758
  st38:
801
759
  if ( ++p == pe )
802
760
  goto _test_eof38;
803
761
  case 38:
804
- if ( (*p) < 65 ) {
805
- if ( 48 <= (*p) && (*p) <= 57 )
806
- goto st37;
807
- } else if ( (*p) > 70 ) {
808
- if ( 97 <= (*p) && (*p) <= 102 )
809
- goto st37;
810
- } else
811
- goto st37;
762
+ if ( (*p) == 47 )
763
+ goto st39;
812
764
  goto st0;
813
765
  st39:
814
766
  if ( ++p == pe )
815
767
  goto _test_eof39;
816
768
  case 39:
817
- switch( (*p) ) {
818
- case 32: goto tr2;
819
- case 36: goto st40;
820
- case 95: goto st40;
821
- }
822
- if ( (*p) < 48 ) {
823
- if ( 45 <= (*p) && (*p) <= 46 )
824
- goto st40;
825
- } else if ( (*p) > 57 ) {
826
- if ( 65 <= (*p) && (*p) <= 90 )
827
- goto st40;
828
- } else
769
+ if ( (*p) == 47 )
829
770
  goto st40;
830
771
  goto st0;
831
772
  st40:
@@ -833,51 +774,62 @@ st40:
833
774
  goto _test_eof40;
834
775
  case 40:
835
776
  switch( (*p) ) {
836
- case 32: goto tr2;
837
- case 36: goto st41;
838
- case 95: goto st41;
777
+ case 37: goto st42;
778
+ case 47: goto st0;
779
+ case 60: goto st0;
780
+ case 91: goto st47;
781
+ case 95: goto st45;
782
+ case 127: goto st0;
839
783
  }
840
- if ( (*p) < 48 ) {
841
- if ( 45 <= (*p) && (*p) <= 46 )
842
- goto st41;
784
+ if ( (*p) < 45 ) {
785
+ if ( (*p) > 32 ) {
786
+ if ( 34 <= (*p) && (*p) <= 35 )
787
+ goto st0;
788
+ } else if ( (*p) >= 0 )
789
+ goto st0;
843
790
  } else if ( (*p) > 57 ) {
844
- if ( 65 <= (*p) && (*p) <= 90 )
845
- goto st41;
791
+ if ( (*p) < 65 ) {
792
+ if ( 62 <= (*p) && (*p) <= 64 )
793
+ goto st0;
794
+ } else if ( (*p) > 90 ) {
795
+ if ( 97 <= (*p) && (*p) <= 122 )
796
+ goto st45;
797
+ } else
798
+ goto st45;
846
799
  } else
847
- goto st41;
848
- goto st0;
800
+ goto st45;
801
+ goto st41;
849
802
  st41:
850
803
  if ( ++p == pe )
851
804
  goto _test_eof41;
852
805
  case 41:
853
806
  switch( (*p) ) {
854
- case 32: goto tr2;
855
- case 36: goto st42;
856
- case 95: goto st42;
807
+ case 37: goto st42;
808
+ case 47: goto st0;
809
+ case 60: goto st0;
810
+ case 64: goto st40;
811
+ case 127: goto st0;
857
812
  }
858
- if ( (*p) < 48 ) {
859
- if ( 45 <= (*p) && (*p) <= 46 )
860
- goto st42;
861
- } else if ( (*p) > 57 ) {
862
- if ( 65 <= (*p) && (*p) <= 90 )
863
- goto st42;
813
+ if ( (*p) < 34 ) {
814
+ if ( 0 <= (*p) && (*p) <= 32 )
815
+ goto st0;
816
+ } else if ( (*p) > 35 ) {
817
+ if ( 62 <= (*p) && (*p) <= 63 )
818
+ goto st0;
864
819
  } else
865
- goto st42;
866
- goto st0;
820
+ goto st0;
821
+ goto st41;
867
822
  st42:
868
823
  if ( ++p == pe )
869
824
  goto _test_eof42;
870
825
  case 42:
871
- switch( (*p) ) {
872
- case 32: goto tr2;
873
- case 36: goto st43;
874
- case 95: goto st43;
875
- }
876
- if ( (*p) < 48 ) {
877
- if ( 45 <= (*p) && (*p) <= 46 )
826
+ if ( (*p) == 117 )
827
+ goto st44;
828
+ if ( (*p) < 65 ) {
829
+ if ( 48 <= (*p) && (*p) <= 57 )
878
830
  goto st43;
879
- } else if ( (*p) > 57 ) {
880
- if ( 65 <= (*p) && (*p) <= 90 )
831
+ } else if ( (*p) > 70 ) {
832
+ if ( 97 <= (*p) && (*p) <= 102 )
881
833
  goto st43;
882
834
  } else
883
835
  goto st43;
@@ -886,145 +838,168 @@ st43:
886
838
  if ( ++p == pe )
887
839
  goto _test_eof43;
888
840
  case 43:
889
- switch( (*p) ) {
890
- case 32: goto tr2;
891
- case 36: goto st44;
892
- case 95: goto st44;
893
- }
894
- if ( (*p) < 48 ) {
895
- if ( 45 <= (*p) && (*p) <= 46 )
896
- goto st44;
897
- } else if ( (*p) > 57 ) {
898
- if ( 65 <= (*p) && (*p) <= 90 )
899
- goto st44;
841
+ if ( (*p) < 65 ) {
842
+ if ( 48 <= (*p) && (*p) <= 57 )
843
+ goto st41;
844
+ } else if ( (*p) > 70 ) {
845
+ if ( 97 <= (*p) && (*p) <= 102 )
846
+ goto st41;
900
847
  } else
901
- goto st44;
848
+ goto st41;
902
849
  goto st0;
903
850
  st44:
904
851
  if ( ++p == pe )
905
852
  goto _test_eof44;
906
853
  case 44:
907
- switch( (*p) ) {
908
- case 32: goto tr2;
909
- case 36: goto st45;
910
- case 95: goto st45;
911
- }
912
- if ( (*p) < 48 ) {
913
- if ( 45 <= (*p) && (*p) <= 46 )
914
- goto st45;
915
- } else if ( (*p) > 57 ) {
916
- if ( 65 <= (*p) && (*p) <= 90 )
917
- goto st45;
854
+ if ( (*p) < 65 ) {
855
+ if ( 48 <= (*p) && (*p) <= 57 )
856
+ goto st43;
857
+ } else if ( (*p) > 70 ) {
858
+ if ( 97 <= (*p) && (*p) <= 102 )
859
+ goto st43;
918
860
  } else
919
- goto st45;
861
+ goto st43;
920
862
  goto st0;
921
863
  st45:
922
864
  if ( ++p == pe )
923
865
  goto _test_eof45;
924
866
  case 45:
925
867
  switch( (*p) ) {
926
- case 32: goto tr2;
927
- case 36: goto st46;
928
- case 95: goto st46;
868
+ case 37: goto st42;
869
+ case 47: goto tr5;
870
+ case 58: goto st46;
871
+ case 60: goto st0;
872
+ case 64: goto st40;
873
+ case 95: goto st45;
874
+ case 127: goto st0;
929
875
  }
930
- if ( (*p) < 48 ) {
931
- if ( 45 <= (*p) && (*p) <= 46 )
932
- goto st46;
876
+ if ( (*p) < 45 ) {
877
+ if ( (*p) > 32 ) {
878
+ if ( 34 <= (*p) && (*p) <= 35 )
879
+ goto st0;
880
+ } else if ( (*p) >= 0 )
881
+ goto st0;
933
882
  } else if ( (*p) > 57 ) {
934
- if ( 65 <= (*p) && (*p) <= 90 )
935
- goto st46;
883
+ if ( (*p) < 65 ) {
884
+ if ( 62 <= (*p) && (*p) <= 63 )
885
+ goto st0;
886
+ } else if ( (*p) > 90 ) {
887
+ if ( 97 <= (*p) && (*p) <= 122 )
888
+ goto st45;
889
+ } else
890
+ goto st45;
936
891
  } else
937
- goto st46;
938
- goto st0;
892
+ goto st45;
893
+ goto st41;
939
894
  st46:
940
895
  if ( ++p == pe )
941
896
  goto _test_eof46;
942
897
  case 46:
943
898
  switch( (*p) ) {
944
- case 32: goto tr2;
945
- case 36: goto st47;
946
- case 95: goto st47;
899
+ case 37: goto st42;
900
+ case 47: goto tr5;
901
+ case 60: goto st0;
902
+ case 64: goto st40;
903
+ case 127: goto st0;
947
904
  }
948
- if ( (*p) < 48 ) {
949
- if ( 45 <= (*p) && (*p) <= 46 )
950
- goto st47;
951
- } else if ( (*p) > 57 ) {
952
- if ( 65 <= (*p) && (*p) <= 90 )
953
- goto st47;
905
+ if ( (*p) < 34 ) {
906
+ if ( 0 <= (*p) && (*p) <= 32 )
907
+ goto st0;
908
+ } else if ( (*p) > 35 ) {
909
+ if ( (*p) > 57 ) {
910
+ if ( 62 <= (*p) && (*p) <= 63 )
911
+ goto st0;
912
+ } else if ( (*p) >= 48 )
913
+ goto st46;
954
914
  } else
955
- goto st47;
956
- goto st0;
915
+ goto st0;
916
+ goto st41;
957
917
  st47:
958
918
  if ( ++p == pe )
959
919
  goto _test_eof47;
960
920
  case 47:
961
921
  switch( (*p) ) {
962
- case 32: goto tr2;
963
- case 36: goto st48;
964
- case 95: goto st48;
922
+ case 37: goto st42;
923
+ case 47: goto st0;
924
+ case 60: goto st0;
925
+ case 64: goto st40;
926
+ case 127: goto st0;
965
927
  }
966
928
  if ( (*p) < 48 ) {
967
- if ( 45 <= (*p) && (*p) <= 46 )
968
- goto st48;
969
- } else if ( (*p) > 57 ) {
970
- if ( 65 <= (*p) && (*p) <= 90 )
929
+ if ( (*p) > 32 ) {
930
+ if ( 34 <= (*p) && (*p) <= 35 )
931
+ goto st0;
932
+ } else if ( (*p) >= 0 )
933
+ goto st0;
934
+ } else if ( (*p) > 58 ) {
935
+ if ( (*p) < 65 ) {
936
+ if ( 62 <= (*p) && (*p) <= 63 )
937
+ goto st0;
938
+ } else if ( (*p) > 70 ) {
939
+ if ( 97 <= (*p) && (*p) <= 102 )
940
+ goto st48;
941
+ } else
971
942
  goto st48;
972
943
  } else
973
944
  goto st48;
974
- goto st0;
945
+ goto st41;
975
946
  st48:
976
947
  if ( ++p == pe )
977
948
  goto _test_eof48;
978
949
  case 48:
979
950
  switch( (*p) ) {
980
- case 32: goto tr2;
981
- case 36: goto st49;
982
- case 95: goto st49;
951
+ case 37: goto st42;
952
+ case 47: goto st0;
953
+ case 60: goto st0;
954
+ case 64: goto st40;
955
+ case 93: goto st49;
956
+ case 127: goto st0;
983
957
  }
984
958
  if ( (*p) < 48 ) {
985
- if ( 45 <= (*p) && (*p) <= 46 )
986
- goto st49;
987
- } else if ( (*p) > 57 ) {
988
- if ( 65 <= (*p) && (*p) <= 90 )
989
- goto st49;
959
+ if ( (*p) > 32 ) {
960
+ if ( 34 <= (*p) && (*p) <= 35 )
961
+ goto st0;
962
+ } else if ( (*p) >= 0 )
963
+ goto st0;
964
+ } else if ( (*p) > 58 ) {
965
+ if ( (*p) < 65 ) {
966
+ if ( 62 <= (*p) && (*p) <= 63 )
967
+ goto st0;
968
+ } else if ( (*p) > 70 ) {
969
+ if ( 97 <= (*p) && (*p) <= 102 )
970
+ goto st48;
971
+ } else
972
+ goto st48;
990
973
  } else
991
- goto st49;
992
- goto st0;
974
+ goto st48;
975
+ goto st41;
993
976
  st49:
994
977
  if ( ++p == pe )
995
978
  goto _test_eof49;
996
979
  case 49:
997
980
  switch( (*p) ) {
998
- case 32: goto tr2;
999
- case 36: goto st50;
1000
- case 95: goto st50;
981
+ case 37: goto st42;
982
+ case 47: goto tr5;
983
+ case 58: goto st46;
984
+ case 60: goto st0;
985
+ case 64: goto st40;
986
+ case 127: goto st0;
1001
987
  }
1002
- if ( (*p) < 48 ) {
1003
- if ( 45 <= (*p) && (*p) <= 46 )
1004
- goto st50;
1005
- } else if ( (*p) > 57 ) {
1006
- if ( 65 <= (*p) && (*p) <= 90 )
1007
- goto st50;
988
+ if ( (*p) < 34 ) {
989
+ if ( 0 <= (*p) && (*p) <= 32 )
990
+ goto st0;
991
+ } else if ( (*p) > 35 ) {
992
+ if ( 62 <= (*p) && (*p) <= 63 )
993
+ goto st0;
1008
994
  } else
1009
- goto st50;
1010
- goto st0;
995
+ goto st0;
996
+ goto st41;
1011
997
  st50:
1012
998
  if ( ++p == pe )
1013
999
  goto _test_eof50;
1014
1000
  case 50:
1015
- switch( (*p) ) {
1016
- case 32: goto tr2;
1017
- case 36: goto st51;
1018
- case 95: goto st51;
1019
- }
1020
- if ( (*p) < 48 ) {
1021
- if ( 45 <= (*p) && (*p) <= 46 )
1022
- goto st51;
1023
- } else if ( (*p) > 57 ) {
1024
- if ( 65 <= (*p) && (*p) <= 90 )
1025
- goto st51;
1026
- } else
1027
- goto st51;
1001
+ if ( (*p) == 58 )
1002
+ goto st38;
1028
1003
  goto st0;
1029
1004
  st51:
1030
1005
  if ( ++p == pe )
@@ -1138,6 +1113,222 @@ st57:
1138
1113
  if ( ++p == pe )
1139
1114
  goto _test_eof57;
1140
1115
  case 57:
1116
+ switch( (*p) ) {
1117
+ case 32: goto tr2;
1118
+ case 36: goto st58;
1119
+ case 95: goto st58;
1120
+ }
1121
+ if ( (*p) < 48 ) {
1122
+ if ( 45 <= (*p) && (*p) <= 46 )
1123
+ goto st58;
1124
+ } else if ( (*p) > 57 ) {
1125
+ if ( 65 <= (*p) && (*p) <= 90 )
1126
+ goto st58;
1127
+ } else
1128
+ goto st58;
1129
+ goto st0;
1130
+ st58:
1131
+ if ( ++p == pe )
1132
+ goto _test_eof58;
1133
+ case 58:
1134
+ switch( (*p) ) {
1135
+ case 32: goto tr2;
1136
+ case 36: goto st59;
1137
+ case 95: goto st59;
1138
+ }
1139
+ if ( (*p) < 48 ) {
1140
+ if ( 45 <= (*p) && (*p) <= 46 )
1141
+ goto st59;
1142
+ } else if ( (*p) > 57 ) {
1143
+ if ( 65 <= (*p) && (*p) <= 90 )
1144
+ goto st59;
1145
+ } else
1146
+ goto st59;
1147
+ goto st0;
1148
+ st59:
1149
+ if ( ++p == pe )
1150
+ goto _test_eof59;
1151
+ case 59:
1152
+ switch( (*p) ) {
1153
+ case 32: goto tr2;
1154
+ case 36: goto st60;
1155
+ case 95: goto st60;
1156
+ }
1157
+ if ( (*p) < 48 ) {
1158
+ if ( 45 <= (*p) && (*p) <= 46 )
1159
+ goto st60;
1160
+ } else if ( (*p) > 57 ) {
1161
+ if ( 65 <= (*p) && (*p) <= 90 )
1162
+ goto st60;
1163
+ } else
1164
+ goto st60;
1165
+ goto st0;
1166
+ st60:
1167
+ if ( ++p == pe )
1168
+ goto _test_eof60;
1169
+ case 60:
1170
+ switch( (*p) ) {
1171
+ case 32: goto tr2;
1172
+ case 36: goto st61;
1173
+ case 95: goto st61;
1174
+ }
1175
+ if ( (*p) < 48 ) {
1176
+ if ( 45 <= (*p) && (*p) <= 46 )
1177
+ goto st61;
1178
+ } else if ( (*p) > 57 ) {
1179
+ if ( 65 <= (*p) && (*p) <= 90 )
1180
+ goto st61;
1181
+ } else
1182
+ goto st61;
1183
+ goto st0;
1184
+ st61:
1185
+ if ( ++p == pe )
1186
+ goto _test_eof61;
1187
+ case 61:
1188
+ switch( (*p) ) {
1189
+ case 32: goto tr2;
1190
+ case 36: goto st62;
1191
+ case 95: goto st62;
1192
+ }
1193
+ if ( (*p) < 48 ) {
1194
+ if ( 45 <= (*p) && (*p) <= 46 )
1195
+ goto st62;
1196
+ } else if ( (*p) > 57 ) {
1197
+ if ( 65 <= (*p) && (*p) <= 90 )
1198
+ goto st62;
1199
+ } else
1200
+ goto st62;
1201
+ goto st0;
1202
+ st62:
1203
+ if ( ++p == pe )
1204
+ goto _test_eof62;
1205
+ case 62:
1206
+ switch( (*p) ) {
1207
+ case 32: goto tr2;
1208
+ case 36: goto st63;
1209
+ case 95: goto st63;
1210
+ }
1211
+ if ( (*p) < 48 ) {
1212
+ if ( 45 <= (*p) && (*p) <= 46 )
1213
+ goto st63;
1214
+ } else if ( (*p) > 57 ) {
1215
+ if ( 65 <= (*p) && (*p) <= 90 )
1216
+ goto st63;
1217
+ } else
1218
+ goto st63;
1219
+ goto st0;
1220
+ st63:
1221
+ if ( ++p == pe )
1222
+ goto _test_eof63;
1223
+ case 63:
1224
+ switch( (*p) ) {
1225
+ case 32: goto tr2;
1226
+ case 36: goto st64;
1227
+ case 95: goto st64;
1228
+ }
1229
+ if ( (*p) < 48 ) {
1230
+ if ( 45 <= (*p) && (*p) <= 46 )
1231
+ goto st64;
1232
+ } else if ( (*p) > 57 ) {
1233
+ if ( 65 <= (*p) && (*p) <= 90 )
1234
+ goto st64;
1235
+ } else
1236
+ goto st64;
1237
+ goto st0;
1238
+ st64:
1239
+ if ( ++p == pe )
1240
+ goto _test_eof64;
1241
+ case 64:
1242
+ switch( (*p) ) {
1243
+ case 32: goto tr2;
1244
+ case 36: goto st65;
1245
+ case 95: goto st65;
1246
+ }
1247
+ if ( (*p) < 48 ) {
1248
+ if ( 45 <= (*p) && (*p) <= 46 )
1249
+ goto st65;
1250
+ } else if ( (*p) > 57 ) {
1251
+ if ( 65 <= (*p) && (*p) <= 90 )
1252
+ goto st65;
1253
+ } else
1254
+ goto st65;
1255
+ goto st0;
1256
+ st65:
1257
+ if ( ++p == pe )
1258
+ goto _test_eof65;
1259
+ case 65:
1260
+ switch( (*p) ) {
1261
+ case 32: goto tr2;
1262
+ case 36: goto st66;
1263
+ case 95: goto st66;
1264
+ }
1265
+ if ( (*p) < 48 ) {
1266
+ if ( 45 <= (*p) && (*p) <= 46 )
1267
+ goto st66;
1268
+ } else if ( (*p) > 57 ) {
1269
+ if ( 65 <= (*p) && (*p) <= 90 )
1270
+ goto st66;
1271
+ } else
1272
+ goto st66;
1273
+ goto st0;
1274
+ st66:
1275
+ if ( ++p == pe )
1276
+ goto _test_eof66;
1277
+ case 66:
1278
+ switch( (*p) ) {
1279
+ case 32: goto tr2;
1280
+ case 36: goto st67;
1281
+ case 95: goto st67;
1282
+ }
1283
+ if ( (*p) < 48 ) {
1284
+ if ( 45 <= (*p) && (*p) <= 46 )
1285
+ goto st67;
1286
+ } else if ( (*p) > 57 ) {
1287
+ if ( 65 <= (*p) && (*p) <= 90 )
1288
+ goto st67;
1289
+ } else
1290
+ goto st67;
1291
+ goto st0;
1292
+ st67:
1293
+ if ( ++p == pe )
1294
+ goto _test_eof67;
1295
+ case 67:
1296
+ switch( (*p) ) {
1297
+ case 32: goto tr2;
1298
+ case 36: goto st68;
1299
+ case 95: goto st68;
1300
+ }
1301
+ if ( (*p) < 48 ) {
1302
+ if ( 45 <= (*p) && (*p) <= 46 )
1303
+ goto st68;
1304
+ } else if ( (*p) > 57 ) {
1305
+ if ( 65 <= (*p) && (*p) <= 90 )
1306
+ goto st68;
1307
+ } else
1308
+ goto st68;
1309
+ goto st0;
1310
+ st68:
1311
+ if ( ++p == pe )
1312
+ goto _test_eof68;
1313
+ case 68:
1314
+ switch( (*p) ) {
1315
+ case 32: goto tr2;
1316
+ case 36: goto st69;
1317
+ case 95: goto st69;
1318
+ }
1319
+ if ( (*p) < 48 ) {
1320
+ if ( 45 <= (*p) && (*p) <= 46 )
1321
+ goto st69;
1322
+ } else if ( (*p) > 57 ) {
1323
+ if ( 65 <= (*p) && (*p) <= 90 )
1324
+ goto st69;
1325
+ } else
1326
+ goto st69;
1327
+ goto st0;
1328
+ st69:
1329
+ if ( ++p == pe )
1330
+ goto _test_eof69;
1331
+ case 69:
1141
1332
  if ( (*p) == 32 )
1142
1333
  goto tr2;
1143
1334
  goto st0;
@@ -1157,7 +1348,7 @@ case 57:
1157
1348
  _test_eof14: cs = 14; goto _test_eof;
1158
1349
  _test_eof15: cs = 15; goto _test_eof;
1159
1350
  _test_eof16: cs = 16; goto _test_eof;
1160
- _test_eof58: cs = 58; goto _test_eof;
1351
+ _test_eof70: cs = 70; goto _test_eof;
1161
1352
  _test_eof17: cs = 17; goto _test_eof;
1162
1353
  _test_eof18: cs = 18; goto _test_eof;
1163
1354
  _test_eof19: cs = 19; goto _test_eof;
@@ -1199,6 +1390,18 @@ case 57:
1199
1390
  _test_eof55: cs = 55; goto _test_eof;
1200
1391
  _test_eof56: cs = 56; goto _test_eof;
1201
1392
  _test_eof57: cs = 57; goto _test_eof;
1393
+ _test_eof58: cs = 58; goto _test_eof;
1394
+ _test_eof59: cs = 59; goto _test_eof;
1395
+ _test_eof60: cs = 60; goto _test_eof;
1396
+ _test_eof61: cs = 61; goto _test_eof;
1397
+ _test_eof62: cs = 62; goto _test_eof;
1398
+ _test_eof63: cs = 63; goto _test_eof;
1399
+ _test_eof64: cs = 64; goto _test_eof;
1400
+ _test_eof65: cs = 65; goto _test_eof;
1401
+ _test_eof66: cs = 66; goto _test_eof;
1402
+ _test_eof67: cs = 67; goto _test_eof;
1403
+ _test_eof68: cs = 68; goto _test_eof;
1404
+ _test_eof69: cs = 69; goto _test_eof;
1202
1405
 
1203
1406
  _test_eof: {}
1204
1407
  _out: {}
@@ -1224,6 +1427,14 @@ case 57:
1224
1427
  return(parser->nread);
1225
1428
  }
1226
1429
 
1430
+ int thin_http_parser_has_error(http_parser *parser) {
1431
+ return parser->cs == http_parser_error;
1432
+ }
1433
+
1434
+ int thin_http_parser_is_finished(http_parser *parser) {
1435
+ return parser->cs == http_parser_first_final;
1436
+ }
1437
+
1227
1438
  int thin_http_parser_finish(http_parser *parser)
1228
1439
  {
1229
1440
  int cs = parser->cs;
@@ -1239,11 +1450,3 @@ int thin_http_parser_finish(http_parser *parser)
1239
1450
  return 0;
1240
1451
  }
1241
1452
  }
1242
-
1243
- int thin_http_parser_has_error(http_parser *parser) {
1244
- return parser->cs == http_parser_error;
1245
- }
1246
-
1247
- int thin_http_parser_is_finished(http_parser *parser) {
1248
- return parser->cs == http_parser_first_final;
1249
- }