unicorn 5.4.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.manifest +7 -3
- data/.olddoc.yml +12 -7
- data/Application_Timeouts +4 -4
- data/Documentation/.gitignore +1 -3
- data/Documentation/unicorn.1 +222 -0
- data/Documentation/unicorn_rails.1 +207 -0
- data/FAQ +1 -1
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +111 -57
- data/HACKING +1 -1
- data/ISSUES +21 -23
- data/KNOWN_ISSUES +2 -2
- data/LATEST +18 -8
- data/LICENSE +2 -2
- data/Links +13 -11
- data/NEWS +94 -0
- data/README +25 -11
- data/SIGNALS +1 -1
- data/Sandbox +4 -4
- data/archive/slrnpull.conf +1 -1
- data/bin/unicorn +3 -1
- data/bin/unicorn_rails +2 -2
- data/examples/big_app_gc.rb +1 -1
- data/examples/logrotate.conf +3 -3
- data/examples/nginx.conf +4 -3
- data/examples/unicorn.conf.minimal.rb +2 -2
- data/examples/unicorn.conf.rb +2 -2
- data/examples/unicorn@.service +7 -0
- data/ext/unicorn_http/common_field_optimization.h +24 -6
- data/ext/unicorn_http/extconf.rb +35 -0
- data/ext/unicorn_http/global_variables.h +2 -2
- data/ext/unicorn_http/httpdate.c +2 -2
- data/ext/unicorn_http/unicorn_http.c +257 -224
- data/ext/unicorn_http/unicorn_http.rl +47 -14
- data/lib/unicorn/configurator.rb +25 -4
- data/lib/unicorn/http_request.rb +12 -2
- data/lib/unicorn/http_server.rb +50 -23
- data/lib/unicorn/launcher.rb +1 -1
- data/lib/unicorn/oob_gc.rb +2 -2
- data/lib/unicorn/socket_helper.rb +3 -2
- data/lib/unicorn/tmpio.rb +8 -2
- data/lib/unicorn/util.rb +3 -3
- data/lib/unicorn/version.rb +1 -1
- data/lib/unicorn/worker.rb +16 -2
- data/lib/unicorn.rb +23 -9
- data/man/man1/unicorn.1 +88 -85
- data/man/man1/unicorn_rails.1 +79 -81
- data/t/GNUmakefile +3 -72
- data/t/README +4 -4
- data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
- data/t/t0301.ru +13 -0
- data/test/benchmark/README +14 -4
- data/test/benchmark/ddstream.ru +50 -0
- data/test/benchmark/readinput.ru +40 -0
- data/test/benchmark/uconnect.perl +66 -0
- data/test/exec/test_exec.rb +15 -14
- data/test/test_helper.rb +22 -30
- data/test/unit/test_ccc.rb +1 -1
- data/test/unit/test_http_parser.rb +16 -0
- data/test/unit/test_http_parser_ng.rb +81 -0
- data/test/unit/test_server.rb +35 -5
- data/test/unit/test_signals.rb +2 -2
- data/test/unit/test_socket_helper.rb +4 -4
- data/test/unit/test_upload.rb +4 -9
- data/test/unit/test_util.rb +25 -0
- data/unicorn.gemspec +8 -7
- metadata +15 -11
- data/Documentation/GNUmakefile +0 -30
- data/Documentation/unicorn.1.txt +0 -187
- data/Documentation/unicorn_rails.1.txt +0 -175
@@ -15,7 +15,7 @@
|
|
15
15
|
#include "global_variables.h"
|
16
16
|
#include "c_util.h"
|
17
17
|
|
18
|
-
void init_unicorn_httpdate(
|
18
|
+
void init_unicorn_httpdate(void);
|
19
19
|
|
20
20
|
#define UH_FL_CHUNKED 0x1
|
21
21
|
#define UH_FL_HASBODY 0x2
|
@@ -64,7 +64,8 @@ struct http_parser {
|
|
64
64
|
} len;
|
65
65
|
};
|
66
66
|
|
67
|
-
static ID id_set_backtrace;
|
67
|
+
static ID id_set_backtrace, id_is_chunked_p;
|
68
|
+
static VALUE cHttpParser;
|
68
69
|
|
69
70
|
#ifdef HAVE_RB_HASH_CLEAR /* Ruby >= 2.0 */
|
70
71
|
# define my_hash_clear(h) (void)rb_hash_clear(h)
|
@@ -222,6 +223,19 @@ static void write_cont_value(struct http_parser *hp,
|
|
222
223
|
rb_str_buf_cat(hp->cont, vptr, end + 1);
|
223
224
|
}
|
224
225
|
|
226
|
+
static int is_chunked(VALUE v)
|
227
|
+
{
|
228
|
+
/* common case first */
|
229
|
+
if (STR_CSTR_CASE_EQ(v, "chunked"))
|
230
|
+
return 1;
|
231
|
+
|
232
|
+
/*
|
233
|
+
* call Ruby function in unicorn/http_request.rb to deal with unlikely
|
234
|
+
* comma-delimited case
|
235
|
+
*/
|
236
|
+
return rb_funcall(cHttpParser, id_is_chunked_p, 1, v) != Qfalse;
|
237
|
+
}
|
238
|
+
|
225
239
|
static void write_value(struct http_parser *hp,
|
226
240
|
const char *buffer, const char *p)
|
227
241
|
{
|
@@ -248,7 +262,9 @@ static void write_value(struct http_parser *hp,
|
|
248
262
|
f = uncommon_field(field, flen);
|
249
263
|
} else if (f == g_http_connection) {
|
250
264
|
hp_keepalive_connection(hp, v);
|
251
|
-
} else if (f == g_content_length) {
|
265
|
+
} else if (f == g_content_length && !HP_FL_TEST(hp, CHUNKED)) {
|
266
|
+
if (hp->len.content)
|
267
|
+
parser_raise(eHttpParserError, "Content-Length already set");
|
252
268
|
hp->len.content = parse_length(RSTRING_PTR(v), RSTRING_LEN(v));
|
253
269
|
if (hp->len.content < 0)
|
254
270
|
parser_raise(eHttpParserError, "invalid Content-Length");
|
@@ -256,9 +272,30 @@ static void write_value(struct http_parser *hp,
|
|
256
272
|
HP_FL_SET(hp, HASBODY);
|
257
273
|
hp_invalid_if_trailer(hp);
|
258
274
|
} else if (f == g_http_transfer_encoding) {
|
259
|
-
if (
|
275
|
+
if (is_chunked(v)) {
|
276
|
+
if (HP_FL_TEST(hp, CHUNKED))
|
277
|
+
/*
|
278
|
+
* RFC 7230 3.3.1:
|
279
|
+
* A sender MUST NOT apply chunked more than once to a message body
|
280
|
+
* (i.e., chunking an already chunked message is not allowed).
|
281
|
+
*/
|
282
|
+
parser_raise(eHttpParserError, "Transfer-Encoding double chunked");
|
283
|
+
|
260
284
|
HP_FL_SET(hp, CHUNKED);
|
261
285
|
HP_FL_SET(hp, HASBODY);
|
286
|
+
|
287
|
+
/* RFC 7230 3.3.3, 3: favor chunked if Content-Length exists */
|
288
|
+
hp->len.content = 0;
|
289
|
+
} else if (HP_FL_TEST(hp, CHUNKED)) {
|
290
|
+
/*
|
291
|
+
* RFC 7230 3.3.3, point 3 states:
|
292
|
+
* If a Transfer-Encoding header field is present in a request and
|
293
|
+
* the chunked transfer coding is not the final encoding, the
|
294
|
+
* message body length cannot be determined reliably; the server
|
295
|
+
* MUST respond with the 400 (Bad Request) status code and then
|
296
|
+
* close the connection.
|
297
|
+
*/
|
298
|
+
parser_raise(eHttpParserError, "invalid Transfer-Encoding");
|
262
299
|
}
|
263
300
|
hp_invalid_if_trailer(hp);
|
264
301
|
} else if (f == g_http_trailer) {
|
@@ -287,12 +324,12 @@ static void write_value(struct http_parser *hp,
|
|
287
324
|
/** Machine **/
|
288
325
|
|
289
326
|
|
290
|
-
#line
|
327
|
+
#line 431 "unicorn_http.rl"
|
291
328
|
|
292
329
|
|
293
330
|
/** Data **/
|
294
331
|
|
295
|
-
#line
|
332
|
+
#line 333 "unicorn_http.c"
|
296
333
|
static const int http_parser_start = 1;
|
297
334
|
static const int http_parser_first_final = 122;
|
298
335
|
static const int http_parser_error = 0;
|
@@ -303,7 +340,7 @@ static const int http_parser_en_Trailers = 114;
|
|
303
340
|
static const int http_parser_en_main = 1;
|
304
341
|
|
305
342
|
|
306
|
-
#line
|
343
|
+
#line 435 "unicorn_http.rl"
|
307
344
|
|
308
345
|
static void http_parser_init(struct http_parser *hp)
|
309
346
|
{
|
@@ -316,12 +353,12 @@ static void http_parser_init(struct http_parser *hp)
|
|
316
353
|
hp->len.content = 0;
|
317
354
|
hp->cont = Qfalse; /* zero on MRI, should be optimized away by above */
|
318
355
|
|
319
|
-
#line
|
356
|
+
#line 357 "unicorn_http.c"
|
320
357
|
{
|
321
358
|
cs = http_parser_start;
|
322
359
|
}
|
323
360
|
|
324
|
-
#line
|
361
|
+
#line 447 "unicorn_http.rl"
|
325
362
|
hp->cs = cs;
|
326
363
|
}
|
327
364
|
|
@@ -349,7 +386,7 @@ http_parser_execute(struct http_parser *hp, char *buffer, size_t len)
|
|
349
386
|
goto skip_chunk_data_hack;
|
350
387
|
}
|
351
388
|
|
352
|
-
#line
|
389
|
+
#line 390 "unicorn_http.c"
|
353
390
|
{
|
354
391
|
if ( p == pe )
|
355
392
|
goto _test_eof;
|
@@ -384,14 +421,14 @@ st0:
|
|
384
421
|
cs = 0;
|
385
422
|
goto _out;
|
386
423
|
tr0:
|
387
|
-
#line
|
424
|
+
#line 327 "unicorn_http.rl"
|
388
425
|
{MARK(mark, p); }
|
389
426
|
goto st2;
|
390
427
|
st2:
|
391
428
|
if ( ++p == pe )
|
392
429
|
goto _test_eof2;
|
393
430
|
case 2:
|
394
|
-
#line
|
431
|
+
#line 432 "unicorn_http.c"
|
395
432
|
switch( (*p) ) {
|
396
433
|
case 32: goto tr3;
|
397
434
|
case 33: goto st49;
|
@@ -417,14 +454,14 @@ case 2:
|
|
417
454
|
goto st49;
|
418
455
|
goto st0;
|
419
456
|
tr3:
|
420
|
-
#line
|
457
|
+
#line 336 "unicorn_http.rl"
|
421
458
|
{ request_method(hp, PTR_TO(mark), LEN(mark, p)); }
|
422
459
|
goto st3;
|
423
460
|
st3:
|
424
461
|
if ( ++p == pe )
|
425
462
|
goto _test_eof3;
|
426
463
|
case 3:
|
427
|
-
#line
|
464
|
+
#line 465 "unicorn_http.c"
|
428
465
|
switch( (*p) ) {
|
429
466
|
case 42: goto tr5;
|
430
467
|
case 47: goto tr6;
|
@@ -433,21 +470,21 @@ case 3:
|
|
433
470
|
}
|
434
471
|
goto st0;
|
435
472
|
tr5:
|
436
|
-
#line
|
473
|
+
#line 327 "unicorn_http.rl"
|
437
474
|
{MARK(mark, p); }
|
438
475
|
goto st4;
|
439
476
|
st4:
|
440
477
|
if ( ++p == pe )
|
441
478
|
goto _test_eof4;
|
442
479
|
case 4:
|
443
|
-
#line
|
480
|
+
#line 481 "unicorn_http.c"
|
444
481
|
switch( (*p) ) {
|
445
482
|
case 32: goto tr8;
|
446
483
|
case 35: goto tr9;
|
447
484
|
}
|
448
485
|
goto st0;
|
449
486
|
tr8:
|
450
|
-
#line
|
487
|
+
#line 341 "unicorn_http.rl"
|
451
488
|
{
|
452
489
|
VALUE str;
|
453
490
|
|
@@ -465,23 +502,23 @@ tr8:
|
|
465
502
|
}
|
466
503
|
goto st5;
|
467
504
|
tr42:
|
468
|
-
#line
|
505
|
+
#line 327 "unicorn_http.rl"
|
469
506
|
{MARK(mark, p); }
|
470
|
-
#line
|
507
|
+
#line 356 "unicorn_http.rl"
|
471
508
|
{
|
472
509
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
473
510
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
474
511
|
}
|
475
512
|
goto st5;
|
476
513
|
tr45:
|
477
|
-
#line
|
514
|
+
#line 356 "unicorn_http.rl"
|
478
515
|
{
|
479
516
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
480
517
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
481
518
|
}
|
482
519
|
goto st5;
|
483
520
|
tr49:
|
484
|
-
#line
|
521
|
+
#line 366 "unicorn_http.rl"
|
485
522
|
{
|
486
523
|
VALUE val;
|
487
524
|
|
@@ -492,7 +529,7 @@ tr49:
|
|
492
529
|
if (!STR_CSTR_EQ(val, "*"))
|
493
530
|
rb_hash_aset(hp->env, g_path_info, val);
|
494
531
|
}
|
495
|
-
#line
|
532
|
+
#line 341 "unicorn_http.rl"
|
496
533
|
{
|
497
534
|
VALUE str;
|
498
535
|
|
@@ -510,14 +547,14 @@ tr49:
|
|
510
547
|
}
|
511
548
|
goto st5;
|
512
549
|
tr55:
|
513
|
-
#line
|
550
|
+
#line 360 "unicorn_http.rl"
|
514
551
|
{MARK(start.query, p); }
|
515
|
-
#line
|
552
|
+
#line 361 "unicorn_http.rl"
|
516
553
|
{
|
517
554
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
518
555
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
519
556
|
}
|
520
|
-
#line
|
557
|
+
#line 341 "unicorn_http.rl"
|
521
558
|
{
|
522
559
|
VALUE str;
|
523
560
|
|
@@ -535,12 +572,12 @@ tr55:
|
|
535
572
|
}
|
536
573
|
goto st5;
|
537
574
|
tr59:
|
538
|
-
#line
|
575
|
+
#line 361 "unicorn_http.rl"
|
539
576
|
{
|
540
577
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
541
578
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
542
579
|
}
|
543
|
-
#line
|
580
|
+
#line 341 "unicorn_http.rl"
|
544
581
|
{
|
545
582
|
VALUE str;
|
546
583
|
|
@@ -561,19 +598,19 @@ st5:
|
|
561
598
|
if ( ++p == pe )
|
562
599
|
goto _test_eof5;
|
563
600
|
case 5:
|
564
|
-
#line
|
601
|
+
#line 602 "unicorn_http.c"
|
565
602
|
if ( (*p) == 72 )
|
566
603
|
goto tr10;
|
567
604
|
goto st0;
|
568
605
|
tr10:
|
569
|
-
#line
|
606
|
+
#line 327 "unicorn_http.rl"
|
570
607
|
{MARK(mark, p); }
|
571
608
|
goto st6;
|
572
609
|
st6:
|
573
610
|
if ( ++p == pe )
|
574
611
|
goto _test_eof6;
|
575
612
|
case 6:
|
576
|
-
#line
|
613
|
+
#line 614 "unicorn_http.c"
|
577
614
|
if ( (*p) == 84 )
|
578
615
|
goto st7;
|
579
616
|
goto st0;
|
@@ -633,34 +670,34 @@ case 13:
|
|
633
670
|
goto st13;
|
634
671
|
goto st0;
|
635
672
|
tr18:
|
636
|
-
#line
|
673
|
+
#line 365 "unicorn_http.rl"
|
637
674
|
{ http_version(hp, PTR_TO(mark), LEN(mark, p)); }
|
638
675
|
goto st14;
|
639
676
|
tr26:
|
640
|
-
#line
|
677
|
+
#line 333 "unicorn_http.rl"
|
641
678
|
{ MARK(mark, p); }
|
642
|
-
#line
|
679
|
+
#line 335 "unicorn_http.rl"
|
643
680
|
{ write_cont_value(hp, buffer, p); }
|
644
681
|
goto st14;
|
645
682
|
tr29:
|
646
|
-
#line
|
683
|
+
#line 335 "unicorn_http.rl"
|
647
684
|
{ write_cont_value(hp, buffer, p); }
|
648
685
|
goto st14;
|
649
686
|
tr36:
|
650
|
-
#line
|
687
|
+
#line 333 "unicorn_http.rl"
|
651
688
|
{ MARK(mark, p); }
|
652
|
-
#line
|
689
|
+
#line 334 "unicorn_http.rl"
|
653
690
|
{ write_value(hp, buffer, p); }
|
654
691
|
goto st14;
|
655
692
|
tr39:
|
656
|
-
#line
|
693
|
+
#line 334 "unicorn_http.rl"
|
657
694
|
{ write_value(hp, buffer, p); }
|
658
695
|
goto st14;
|
659
696
|
st14:
|
660
697
|
if ( ++p == pe )
|
661
698
|
goto _test_eof14;
|
662
699
|
case 14:
|
663
|
-
#line
|
700
|
+
#line 701 "unicorn_http.c"
|
664
701
|
switch( (*p) ) {
|
665
702
|
case 9: goto st15;
|
666
703
|
case 10: goto tr21;
|
@@ -689,14 +726,14 @@ case 14:
|
|
689
726
|
goto tr23;
|
690
727
|
goto st0;
|
691
728
|
tr25:
|
692
|
-
#line
|
729
|
+
#line 333 "unicorn_http.rl"
|
693
730
|
{ MARK(mark, p); }
|
694
731
|
goto st15;
|
695
732
|
st15:
|
696
733
|
if ( ++p == pe )
|
697
734
|
goto _test_eof15;
|
698
735
|
case 15:
|
699
|
-
#line
|
736
|
+
#line 737 "unicorn_http.c"
|
700
737
|
switch( (*p) ) {
|
701
738
|
case 9: goto tr25;
|
702
739
|
case 10: goto tr26;
|
@@ -708,14 +745,14 @@ case 15:
|
|
708
745
|
goto st0;
|
709
746
|
goto tr24;
|
710
747
|
tr24:
|
711
|
-
#line
|
748
|
+
#line 333 "unicorn_http.rl"
|
712
749
|
{ MARK(mark, p); }
|
713
750
|
goto st16;
|
714
751
|
st16:
|
715
752
|
if ( ++p == pe )
|
716
753
|
goto _test_eof16;
|
717
754
|
case 16:
|
718
|
-
#line
|
755
|
+
#line 756 "unicorn_http.c"
|
719
756
|
switch( (*p) ) {
|
720
757
|
case 10: goto tr29;
|
721
758
|
case 13: goto tr30;
|
@@ -728,39 +765,39 @@ case 16:
|
|
728
765
|
goto st0;
|
729
766
|
goto st16;
|
730
767
|
tr19:
|
731
|
-
#line
|
768
|
+
#line 365 "unicorn_http.rl"
|
732
769
|
{ http_version(hp, PTR_TO(mark), LEN(mark, p)); }
|
733
770
|
goto st17;
|
734
771
|
tr27:
|
735
|
-
#line
|
772
|
+
#line 333 "unicorn_http.rl"
|
736
773
|
{ MARK(mark, p); }
|
737
|
-
#line
|
774
|
+
#line 335 "unicorn_http.rl"
|
738
775
|
{ write_cont_value(hp, buffer, p); }
|
739
776
|
goto st17;
|
740
777
|
tr30:
|
741
|
-
#line
|
778
|
+
#line 335 "unicorn_http.rl"
|
742
779
|
{ write_cont_value(hp, buffer, p); }
|
743
780
|
goto st17;
|
744
781
|
tr37:
|
745
|
-
#line
|
782
|
+
#line 333 "unicorn_http.rl"
|
746
783
|
{ MARK(mark, p); }
|
747
|
-
#line
|
784
|
+
#line 334 "unicorn_http.rl"
|
748
785
|
{ write_value(hp, buffer, p); }
|
749
786
|
goto st17;
|
750
787
|
tr40:
|
751
|
-
#line
|
788
|
+
#line 334 "unicorn_http.rl"
|
752
789
|
{ write_value(hp, buffer, p); }
|
753
790
|
goto st17;
|
754
791
|
st17:
|
755
792
|
if ( ++p == pe )
|
756
793
|
goto _test_eof17;
|
757
794
|
case 17:
|
758
|
-
#line
|
795
|
+
#line 796 "unicorn_http.c"
|
759
796
|
if ( (*p) == 10 )
|
760
797
|
goto st14;
|
761
798
|
goto st0;
|
762
799
|
tr21:
|
763
|
-
#line
|
800
|
+
#line 381 "unicorn_http.rl"
|
764
801
|
{
|
765
802
|
finalize_header(hp);
|
766
803
|
|
@@ -781,7 +818,7 @@ tr21:
|
|
781
818
|
}
|
782
819
|
goto st122;
|
783
820
|
tr104:
|
784
|
-
#line
|
821
|
+
#line 341 "unicorn_http.rl"
|
785
822
|
{
|
786
823
|
VALUE str;
|
787
824
|
|
@@ -797,7 +834,7 @@ tr104:
|
|
797
834
|
rb_hash_aset(hp->env, g_request_path, str);
|
798
835
|
}
|
799
836
|
}
|
800
|
-
#line
|
837
|
+
#line 381 "unicorn_http.rl"
|
801
838
|
{
|
802
839
|
finalize_header(hp);
|
803
840
|
|
@@ -818,14 +855,14 @@ tr104:
|
|
818
855
|
}
|
819
856
|
goto st122;
|
820
857
|
tr108:
|
821
|
-
#line
|
858
|
+
#line 327 "unicorn_http.rl"
|
822
859
|
{MARK(mark, p); }
|
823
|
-
#line
|
860
|
+
#line 356 "unicorn_http.rl"
|
824
861
|
{
|
825
862
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
826
863
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
827
864
|
}
|
828
|
-
#line
|
865
|
+
#line 381 "unicorn_http.rl"
|
829
866
|
{
|
830
867
|
finalize_header(hp);
|
831
868
|
|
@@ -846,12 +883,12 @@ tr108:
|
|
846
883
|
}
|
847
884
|
goto st122;
|
848
885
|
tr112:
|
849
|
-
#line
|
886
|
+
#line 356 "unicorn_http.rl"
|
850
887
|
{
|
851
888
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
852
889
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
853
890
|
}
|
854
|
-
#line
|
891
|
+
#line 381 "unicorn_http.rl"
|
855
892
|
{
|
856
893
|
finalize_header(hp);
|
857
894
|
|
@@ -872,7 +909,7 @@ tr112:
|
|
872
909
|
}
|
873
910
|
goto st122;
|
874
911
|
tr117:
|
875
|
-
#line
|
912
|
+
#line 366 "unicorn_http.rl"
|
876
913
|
{
|
877
914
|
VALUE val;
|
878
915
|
|
@@ -883,7 +920,7 @@ tr117:
|
|
883
920
|
if (!STR_CSTR_EQ(val, "*"))
|
884
921
|
rb_hash_aset(hp->env, g_path_info, val);
|
885
922
|
}
|
886
|
-
#line
|
923
|
+
#line 341 "unicorn_http.rl"
|
887
924
|
{
|
888
925
|
VALUE str;
|
889
926
|
|
@@ -899,7 +936,7 @@ tr117:
|
|
899
936
|
rb_hash_aset(hp->env, g_request_path, str);
|
900
937
|
}
|
901
938
|
}
|
902
|
-
#line
|
939
|
+
#line 381 "unicorn_http.rl"
|
903
940
|
{
|
904
941
|
finalize_header(hp);
|
905
942
|
|
@@ -920,14 +957,14 @@ tr117:
|
|
920
957
|
}
|
921
958
|
goto st122;
|
922
959
|
tr124:
|
923
|
-
#line
|
960
|
+
#line 360 "unicorn_http.rl"
|
924
961
|
{MARK(start.query, p); }
|
925
|
-
#line
|
962
|
+
#line 361 "unicorn_http.rl"
|
926
963
|
{
|
927
964
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
928
965
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
929
966
|
}
|
930
|
-
#line
|
967
|
+
#line 341 "unicorn_http.rl"
|
931
968
|
{
|
932
969
|
VALUE str;
|
933
970
|
|
@@ -943,7 +980,7 @@ tr124:
|
|
943
980
|
rb_hash_aset(hp->env, g_request_path, str);
|
944
981
|
}
|
945
982
|
}
|
946
|
-
#line
|
983
|
+
#line 381 "unicorn_http.rl"
|
947
984
|
{
|
948
985
|
finalize_header(hp);
|
949
986
|
|
@@ -964,12 +1001,12 @@ tr124:
|
|
964
1001
|
}
|
965
1002
|
goto st122;
|
966
1003
|
tr129:
|
967
|
-
#line
|
1004
|
+
#line 361 "unicorn_http.rl"
|
968
1005
|
{
|
969
1006
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
970
1007
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
971
1008
|
}
|
972
|
-
#line
|
1009
|
+
#line 341 "unicorn_http.rl"
|
973
1010
|
{
|
974
1011
|
VALUE str;
|
975
1012
|
|
@@ -985,7 +1022,7 @@ tr129:
|
|
985
1022
|
rb_hash_aset(hp->env, g_request_path, str);
|
986
1023
|
}
|
987
1024
|
}
|
988
|
-
#line
|
1025
|
+
#line 381 "unicorn_http.rl"
|
989
1026
|
{
|
990
1027
|
finalize_header(hp);
|
991
1028
|
|
@@ -1009,10 +1046,10 @@ st122:
|
|
1009
1046
|
if ( ++p == pe )
|
1010
1047
|
goto _test_eof122;
|
1011
1048
|
case 122:
|
1012
|
-
#line
|
1049
|
+
#line 1050 "unicorn_http.c"
|
1013
1050
|
goto st0;
|
1014
1051
|
tr105:
|
1015
|
-
#line
|
1052
|
+
#line 341 "unicorn_http.rl"
|
1016
1053
|
{
|
1017
1054
|
VALUE str;
|
1018
1055
|
|
@@ -1030,23 +1067,23 @@ tr105:
|
|
1030
1067
|
}
|
1031
1068
|
goto st18;
|
1032
1069
|
tr109:
|
1033
|
-
#line
|
1070
|
+
#line 327 "unicorn_http.rl"
|
1034
1071
|
{MARK(mark, p); }
|
1035
|
-
#line
|
1072
|
+
#line 356 "unicorn_http.rl"
|
1036
1073
|
{
|
1037
1074
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
1038
1075
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
1039
1076
|
}
|
1040
1077
|
goto st18;
|
1041
1078
|
tr113:
|
1042
|
-
#line
|
1079
|
+
#line 356 "unicorn_http.rl"
|
1043
1080
|
{
|
1044
1081
|
VALIDATE_MAX_URI_LENGTH(LEN(mark, p), FRAGMENT);
|
1045
1082
|
rb_hash_aset(hp->env, g_fragment, STR_NEW(mark, p));
|
1046
1083
|
}
|
1047
1084
|
goto st18;
|
1048
1085
|
tr118:
|
1049
|
-
#line
|
1086
|
+
#line 366 "unicorn_http.rl"
|
1050
1087
|
{
|
1051
1088
|
VALUE val;
|
1052
1089
|
|
@@ -1057,7 +1094,7 @@ tr118:
|
|
1057
1094
|
if (!STR_CSTR_EQ(val, "*"))
|
1058
1095
|
rb_hash_aset(hp->env, g_path_info, val);
|
1059
1096
|
}
|
1060
|
-
#line
|
1097
|
+
#line 341 "unicorn_http.rl"
|
1061
1098
|
{
|
1062
1099
|
VALUE str;
|
1063
1100
|
|
@@ -1075,14 +1112,14 @@ tr118:
|
|
1075
1112
|
}
|
1076
1113
|
goto st18;
|
1077
1114
|
tr125:
|
1078
|
-
#line
|
1115
|
+
#line 360 "unicorn_http.rl"
|
1079
1116
|
{MARK(start.query, p); }
|
1080
|
-
#line
|
1117
|
+
#line 361 "unicorn_http.rl"
|
1081
1118
|
{
|
1082
1119
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
1083
1120
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
1084
1121
|
}
|
1085
|
-
#line
|
1122
|
+
#line 341 "unicorn_http.rl"
|
1086
1123
|
{
|
1087
1124
|
VALUE str;
|
1088
1125
|
|
@@ -1100,12 +1137,12 @@ tr125:
|
|
1100
1137
|
}
|
1101
1138
|
goto st18;
|
1102
1139
|
tr130:
|
1103
|
-
#line
|
1140
|
+
#line 361 "unicorn_http.rl"
|
1104
1141
|
{
|
1105
1142
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
1106
1143
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
1107
1144
|
}
|
1108
|
-
#line
|
1145
|
+
#line 341 "unicorn_http.rl"
|
1109
1146
|
{
|
1110
1147
|
VALUE str;
|
1111
1148
|
|
@@ -1126,25 +1163,25 @@ st18:
|
|
1126
1163
|
if ( ++p == pe )
|
1127
1164
|
goto _test_eof18;
|
1128
1165
|
case 18:
|
1129
|
-
#line
|
1166
|
+
#line 1167 "unicorn_http.c"
|
1130
1167
|
if ( (*p) == 10 )
|
1131
1168
|
goto tr21;
|
1132
1169
|
goto st0;
|
1133
1170
|
tr23:
|
1134
|
-
#line
|
1171
|
+
#line 329 "unicorn_http.rl"
|
1135
1172
|
{ MARK(start.field, p); }
|
1136
|
-
#line
|
1173
|
+
#line 330 "unicorn_http.rl"
|
1137
1174
|
{ snake_upcase_char(deconst(p)); }
|
1138
1175
|
goto st19;
|
1139
1176
|
tr32:
|
1140
|
-
#line
|
1177
|
+
#line 330 "unicorn_http.rl"
|
1141
1178
|
{ snake_upcase_char(deconst(p)); }
|
1142
1179
|
goto st19;
|
1143
1180
|
st19:
|
1144
1181
|
if ( ++p == pe )
|
1145
1182
|
goto _test_eof19;
|
1146
1183
|
case 19:
|
1147
|
-
#line
|
1184
|
+
#line 1185 "unicorn_http.c"
|
1148
1185
|
switch( (*p) ) {
|
1149
1186
|
case 33: goto tr32;
|
1150
1187
|
case 58: goto tr33;
|
@@ -1170,18 +1207,18 @@ case 19:
|
|
1170
1207
|
goto tr32;
|
1171
1208
|
goto st0;
|
1172
1209
|
tr35:
|
1173
|
-
#line
|
1210
|
+
#line 333 "unicorn_http.rl"
|
1174
1211
|
{ MARK(mark, p); }
|
1175
1212
|
goto st20;
|
1176
1213
|
tr33:
|
1177
|
-
#line
|
1214
|
+
#line 332 "unicorn_http.rl"
|
1178
1215
|
{ hp->s.field_len = LEN(start.field, p); }
|
1179
1216
|
goto st20;
|
1180
1217
|
st20:
|
1181
1218
|
if ( ++p == pe )
|
1182
1219
|
goto _test_eof20;
|
1183
1220
|
case 20:
|
1184
|
-
#line
|
1221
|
+
#line 1222 "unicorn_http.c"
|
1185
1222
|
switch( (*p) ) {
|
1186
1223
|
case 9: goto tr35;
|
1187
1224
|
case 10: goto tr36;
|
@@ -1193,14 +1230,14 @@ case 20:
|
|
1193
1230
|
goto st0;
|
1194
1231
|
goto tr34;
|
1195
1232
|
tr34:
|
1196
|
-
#line
|
1233
|
+
#line 333 "unicorn_http.rl"
|
1197
1234
|
{ MARK(mark, p); }
|
1198
1235
|
goto st21;
|
1199
1236
|
st21:
|
1200
1237
|
if ( ++p == pe )
|
1201
1238
|
goto _test_eof21;
|
1202
1239
|
case 21:
|
1203
|
-
#line
|
1240
|
+
#line 1241 "unicorn_http.c"
|
1204
1241
|
switch( (*p) ) {
|
1205
1242
|
case 10: goto tr39;
|
1206
1243
|
case 13: goto tr40;
|
@@ -1213,7 +1250,7 @@ case 21:
|
|
1213
1250
|
goto st0;
|
1214
1251
|
goto st21;
|
1215
1252
|
tr9:
|
1216
|
-
#line
|
1253
|
+
#line 341 "unicorn_http.rl"
|
1217
1254
|
{
|
1218
1255
|
VALUE str;
|
1219
1256
|
|
@@ -1231,7 +1268,7 @@ tr9:
|
|
1231
1268
|
}
|
1232
1269
|
goto st22;
|
1233
1270
|
tr50:
|
1234
|
-
#line
|
1271
|
+
#line 366 "unicorn_http.rl"
|
1235
1272
|
{
|
1236
1273
|
VALUE val;
|
1237
1274
|
|
@@ -1242,7 +1279,7 @@ tr50:
|
|
1242
1279
|
if (!STR_CSTR_EQ(val, "*"))
|
1243
1280
|
rb_hash_aset(hp->env, g_path_info, val);
|
1244
1281
|
}
|
1245
|
-
#line
|
1282
|
+
#line 341 "unicorn_http.rl"
|
1246
1283
|
{
|
1247
1284
|
VALUE str;
|
1248
1285
|
|
@@ -1260,14 +1297,14 @@ tr50:
|
|
1260
1297
|
}
|
1261
1298
|
goto st22;
|
1262
1299
|
tr56:
|
1263
|
-
#line
|
1300
|
+
#line 360 "unicorn_http.rl"
|
1264
1301
|
{MARK(start.query, p); }
|
1265
|
-
#line
|
1302
|
+
#line 361 "unicorn_http.rl"
|
1266
1303
|
{
|
1267
1304
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
1268
1305
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
1269
1306
|
}
|
1270
|
-
#line
|
1307
|
+
#line 341 "unicorn_http.rl"
|
1271
1308
|
{
|
1272
1309
|
VALUE str;
|
1273
1310
|
|
@@ -1285,12 +1322,12 @@ tr56:
|
|
1285
1322
|
}
|
1286
1323
|
goto st22;
|
1287
1324
|
tr60:
|
1288
|
-
#line
|
1325
|
+
#line 361 "unicorn_http.rl"
|
1289
1326
|
{
|
1290
1327
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
1291
1328
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
1292
1329
|
}
|
1293
|
-
#line
|
1330
|
+
#line 341 "unicorn_http.rl"
|
1294
1331
|
{
|
1295
1332
|
VALUE str;
|
1296
1333
|
|
@@ -1311,7 +1348,7 @@ st22:
|
|
1311
1348
|
if ( ++p == pe )
|
1312
1349
|
goto _test_eof22;
|
1313
1350
|
case 22:
|
1314
|
-
#line
|
1351
|
+
#line 1352 "unicorn_http.c"
|
1315
1352
|
switch( (*p) ) {
|
1316
1353
|
case 32: goto tr42;
|
1317
1354
|
case 35: goto st0;
|
@@ -1322,14 +1359,14 @@ case 22:
|
|
1322
1359
|
goto st0;
|
1323
1360
|
goto tr41;
|
1324
1361
|
tr41:
|
1325
|
-
#line
|
1362
|
+
#line 327 "unicorn_http.rl"
|
1326
1363
|
{MARK(mark, p); }
|
1327
1364
|
goto st23;
|
1328
1365
|
st23:
|
1329
1366
|
if ( ++p == pe )
|
1330
1367
|
goto _test_eof23;
|
1331
1368
|
case 23:
|
1332
|
-
#line
|
1369
|
+
#line 1370 "unicorn_http.c"
|
1333
1370
|
switch( (*p) ) {
|
1334
1371
|
case 32: goto tr45;
|
1335
1372
|
case 35: goto st0;
|
@@ -1340,14 +1377,14 @@ case 23:
|
|
1340
1377
|
goto st0;
|
1341
1378
|
goto st23;
|
1342
1379
|
tr43:
|
1343
|
-
#line
|
1380
|
+
#line 327 "unicorn_http.rl"
|
1344
1381
|
{MARK(mark, p); }
|
1345
1382
|
goto st24;
|
1346
1383
|
st24:
|
1347
1384
|
if ( ++p == pe )
|
1348
1385
|
goto _test_eof24;
|
1349
1386
|
case 24:
|
1350
|
-
#line
|
1387
|
+
#line 1388 "unicorn_http.c"
|
1351
1388
|
if ( (*p) < 65 ) {
|
1352
1389
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1353
1390
|
goto st25;
|
@@ -1371,20 +1408,20 @@ case 25:
|
|
1371
1408
|
goto st23;
|
1372
1409
|
goto st0;
|
1373
1410
|
tr6:
|
1374
|
-
#line
|
1411
|
+
#line 327 "unicorn_http.rl"
|
1375
1412
|
{MARK(mark, p); }
|
1376
1413
|
goto st26;
|
1377
1414
|
tr76:
|
1378
|
-
#line
|
1415
|
+
#line 340 "unicorn_http.rl"
|
1379
1416
|
{ rb_hash_aset(hp->env, g_http_host, STR_NEW(mark, p)); }
|
1380
|
-
#line
|
1417
|
+
#line 327 "unicorn_http.rl"
|
1381
1418
|
{MARK(mark, p); }
|
1382
1419
|
goto st26;
|
1383
1420
|
st26:
|
1384
1421
|
if ( ++p == pe )
|
1385
1422
|
goto _test_eof26;
|
1386
1423
|
case 26:
|
1387
|
-
#line
|
1424
|
+
#line 1425 "unicorn_http.c"
|
1388
1425
|
switch( (*p) ) {
|
1389
1426
|
case 32: goto tr49;
|
1390
1427
|
case 35: goto tr50;
|
@@ -1422,7 +1459,7 @@ case 28:
|
|
1422
1459
|
goto st26;
|
1423
1460
|
goto st0;
|
1424
1461
|
tr52:
|
1425
|
-
#line
|
1462
|
+
#line 366 "unicorn_http.rl"
|
1426
1463
|
{
|
1427
1464
|
VALUE val;
|
1428
1465
|
|
@@ -1438,7 +1475,7 @@ st29:
|
|
1438
1475
|
if ( ++p == pe )
|
1439
1476
|
goto _test_eof29;
|
1440
1477
|
case 29:
|
1441
|
-
#line
|
1478
|
+
#line 1479 "unicorn_http.c"
|
1442
1479
|
switch( (*p) ) {
|
1443
1480
|
case 32: goto tr55;
|
1444
1481
|
case 35: goto tr56;
|
@@ -1449,14 +1486,14 @@ case 29:
|
|
1449
1486
|
goto st0;
|
1450
1487
|
goto tr54;
|
1451
1488
|
tr54:
|
1452
|
-
#line
|
1489
|
+
#line 360 "unicorn_http.rl"
|
1453
1490
|
{MARK(start.query, p); }
|
1454
1491
|
goto st30;
|
1455
1492
|
st30:
|
1456
1493
|
if ( ++p == pe )
|
1457
1494
|
goto _test_eof30;
|
1458
1495
|
case 30:
|
1459
|
-
#line
|
1496
|
+
#line 1497 "unicorn_http.c"
|
1460
1497
|
switch( (*p) ) {
|
1461
1498
|
case 32: goto tr59;
|
1462
1499
|
case 35: goto tr60;
|
@@ -1467,14 +1504,14 @@ case 30:
|
|
1467
1504
|
goto st0;
|
1468
1505
|
goto st30;
|
1469
1506
|
tr57:
|
1470
|
-
#line
|
1507
|
+
#line 360 "unicorn_http.rl"
|
1471
1508
|
{MARK(start.query, p); }
|
1472
1509
|
goto st31;
|
1473
1510
|
st31:
|
1474
1511
|
if ( ++p == pe )
|
1475
1512
|
goto _test_eof31;
|
1476
1513
|
case 31:
|
1477
|
-
#line
|
1514
|
+
#line 1515 "unicorn_http.c"
|
1478
1515
|
if ( (*p) < 65 ) {
|
1479
1516
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1480
1517
|
goto st32;
|
@@ -1498,58 +1535,58 @@ case 32:
|
|
1498
1535
|
goto st30;
|
1499
1536
|
goto st0;
|
1500
1537
|
tr7:
|
1501
|
-
#line
|
1538
|
+
#line 327 "unicorn_http.rl"
|
1502
1539
|
{MARK(mark, p); }
|
1503
|
-
#line
|
1540
|
+
#line 331 "unicorn_http.rl"
|
1504
1541
|
{ downcase_char(deconst(p)); }
|
1505
1542
|
goto st33;
|
1506
1543
|
st33:
|
1507
1544
|
if ( ++p == pe )
|
1508
1545
|
goto _test_eof33;
|
1509
1546
|
case 33:
|
1510
|
-
#line
|
1547
|
+
#line 1548 "unicorn_http.c"
|
1511
1548
|
switch( (*p) ) {
|
1512
1549
|
case 84: goto tr63;
|
1513
1550
|
case 116: goto tr63;
|
1514
1551
|
}
|
1515
1552
|
goto st0;
|
1516
1553
|
tr63:
|
1517
|
-
#line
|
1554
|
+
#line 331 "unicorn_http.rl"
|
1518
1555
|
{ downcase_char(deconst(p)); }
|
1519
1556
|
goto st34;
|
1520
1557
|
st34:
|
1521
1558
|
if ( ++p == pe )
|
1522
1559
|
goto _test_eof34;
|
1523
1560
|
case 34:
|
1524
|
-
#line
|
1561
|
+
#line 1562 "unicorn_http.c"
|
1525
1562
|
switch( (*p) ) {
|
1526
1563
|
case 84: goto tr64;
|
1527
1564
|
case 116: goto tr64;
|
1528
1565
|
}
|
1529
1566
|
goto st0;
|
1530
1567
|
tr64:
|
1531
|
-
#line
|
1568
|
+
#line 331 "unicorn_http.rl"
|
1532
1569
|
{ downcase_char(deconst(p)); }
|
1533
1570
|
goto st35;
|
1534
1571
|
st35:
|
1535
1572
|
if ( ++p == pe )
|
1536
1573
|
goto _test_eof35;
|
1537
1574
|
case 35:
|
1538
|
-
#line
|
1575
|
+
#line 1576 "unicorn_http.c"
|
1539
1576
|
switch( (*p) ) {
|
1540
1577
|
case 80: goto tr65;
|
1541
1578
|
case 112: goto tr65;
|
1542
1579
|
}
|
1543
1580
|
goto st0;
|
1544
1581
|
tr65:
|
1545
|
-
#line
|
1582
|
+
#line 331 "unicorn_http.rl"
|
1546
1583
|
{ downcase_char(deconst(p)); }
|
1547
1584
|
goto st36;
|
1548
1585
|
st36:
|
1549
1586
|
if ( ++p == pe )
|
1550
1587
|
goto _test_eof36;
|
1551
1588
|
case 36:
|
1552
|
-
#line
|
1589
|
+
#line 1590 "unicorn_http.c"
|
1553
1590
|
switch( (*p) ) {
|
1554
1591
|
case 58: goto tr66;
|
1555
1592
|
case 83: goto tr67;
|
@@ -1557,7 +1594,7 @@ case 36:
|
|
1557
1594
|
}
|
1558
1595
|
goto st0;
|
1559
1596
|
tr66:
|
1560
|
-
#line
|
1597
|
+
#line 337 "unicorn_http.rl"
|
1561
1598
|
{
|
1562
1599
|
rb_hash_aset(hp->env, g_rack_url_scheme, STR_NEW(mark, p));
|
1563
1600
|
}
|
@@ -1566,7 +1603,7 @@ st37:
|
|
1566
1603
|
if ( ++p == pe )
|
1567
1604
|
goto _test_eof37;
|
1568
1605
|
case 37:
|
1569
|
-
#line
|
1606
|
+
#line 1607 "unicorn_http.c"
|
1570
1607
|
if ( (*p) == 47 )
|
1571
1608
|
goto st38;
|
1572
1609
|
goto st0;
|
@@ -1654,14 +1691,14 @@ case 42:
|
|
1654
1691
|
goto st40;
|
1655
1692
|
goto st0;
|
1656
1693
|
tr72:
|
1657
|
-
#line
|
1694
|
+
#line 327 "unicorn_http.rl"
|
1658
1695
|
{MARK(mark, p); }
|
1659
1696
|
goto st43;
|
1660
1697
|
st43:
|
1661
1698
|
if ( ++p == pe )
|
1662
1699
|
goto _test_eof43;
|
1663
1700
|
case 43:
|
1664
|
-
#line
|
1701
|
+
#line 1702 "unicorn_http.c"
|
1665
1702
|
switch( (*p) ) {
|
1666
1703
|
case 37: goto st41;
|
1667
1704
|
case 47: goto tr76;
|
@@ -1713,14 +1750,14 @@ case 44:
|
|
1713
1750
|
goto st0;
|
1714
1751
|
goto st40;
|
1715
1752
|
tr73:
|
1716
|
-
#line
|
1753
|
+
#line 327 "unicorn_http.rl"
|
1717
1754
|
{MARK(mark, p); }
|
1718
1755
|
goto st45;
|
1719
1756
|
st45:
|
1720
1757
|
if ( ++p == pe )
|
1721
1758
|
goto _test_eof45;
|
1722
1759
|
case 45:
|
1723
|
-
#line
|
1760
|
+
#line 1761 "unicorn_http.c"
|
1724
1761
|
switch( (*p) ) {
|
1725
1762
|
case 37: goto st41;
|
1726
1763
|
case 47: goto st0;
|
@@ -1798,14 +1835,14 @@ case 47:
|
|
1798
1835
|
goto st0;
|
1799
1836
|
goto st40;
|
1800
1837
|
tr67:
|
1801
|
-
#line
|
1838
|
+
#line 331 "unicorn_http.rl"
|
1802
1839
|
{ downcase_char(deconst(p)); }
|
1803
1840
|
goto st48;
|
1804
1841
|
st48:
|
1805
1842
|
if ( ++p == pe )
|
1806
1843
|
goto _test_eof48;
|
1807
1844
|
case 48:
|
1808
|
-
#line
|
1845
|
+
#line 1846 "unicorn_http.c"
|
1809
1846
|
if ( (*p) == 58 )
|
1810
1847
|
goto tr66;
|
1811
1848
|
goto st0;
|
@@ -2321,14 +2358,14 @@ case 67:
|
|
2321
2358
|
goto tr3;
|
2322
2359
|
goto st0;
|
2323
2360
|
tr2:
|
2324
|
-
#line
|
2361
|
+
#line 327 "unicorn_http.rl"
|
2325
2362
|
{MARK(mark, p); }
|
2326
2363
|
goto st68;
|
2327
2364
|
st68:
|
2328
2365
|
if ( ++p == pe )
|
2329
2366
|
goto _test_eof68;
|
2330
2367
|
case 68:
|
2331
|
-
#line
|
2368
|
+
#line 2369 "unicorn_http.c"
|
2332
2369
|
switch( (*p) ) {
|
2333
2370
|
case 32: goto tr3;
|
2334
2371
|
case 33: goto st49;
|
@@ -2412,14 +2449,14 @@ case 70:
|
|
2412
2449
|
goto st51;
|
2413
2450
|
goto st0;
|
2414
2451
|
tr100:
|
2415
|
-
#line
|
2452
|
+
#line 336 "unicorn_http.rl"
|
2416
2453
|
{ request_method(hp, PTR_TO(mark), LEN(mark, p)); }
|
2417
2454
|
goto st71;
|
2418
2455
|
st71:
|
2419
2456
|
if ( ++p == pe )
|
2420
2457
|
goto _test_eof71;
|
2421
2458
|
case 71:
|
2422
|
-
#line
|
2459
|
+
#line 2460 "unicorn_http.c"
|
2423
2460
|
switch( (*p) ) {
|
2424
2461
|
case 42: goto tr101;
|
2425
2462
|
case 47: goto tr102;
|
@@ -2428,14 +2465,14 @@ case 71:
|
|
2428
2465
|
}
|
2429
2466
|
goto st0;
|
2430
2467
|
tr101:
|
2431
|
-
#line
|
2468
|
+
#line 327 "unicorn_http.rl"
|
2432
2469
|
{MARK(mark, p); }
|
2433
2470
|
goto st72;
|
2434
2471
|
st72:
|
2435
2472
|
if ( ++p == pe )
|
2436
2473
|
goto _test_eof72;
|
2437
2474
|
case 72:
|
2438
|
-
#line
|
2475
|
+
#line 2476 "unicorn_http.c"
|
2439
2476
|
switch( (*p) ) {
|
2440
2477
|
case 10: goto tr104;
|
2441
2478
|
case 13: goto tr105;
|
@@ -2444,7 +2481,7 @@ case 72:
|
|
2444
2481
|
}
|
2445
2482
|
goto st0;
|
2446
2483
|
tr106:
|
2447
|
-
#line
|
2484
|
+
#line 341 "unicorn_http.rl"
|
2448
2485
|
{
|
2449
2486
|
VALUE str;
|
2450
2487
|
|
@@ -2462,7 +2499,7 @@ tr106:
|
|
2462
2499
|
}
|
2463
2500
|
goto st73;
|
2464
2501
|
tr119:
|
2465
|
-
#line
|
2502
|
+
#line 366 "unicorn_http.rl"
|
2466
2503
|
{
|
2467
2504
|
VALUE val;
|
2468
2505
|
|
@@ -2473,7 +2510,7 @@ tr119:
|
|
2473
2510
|
if (!STR_CSTR_EQ(val, "*"))
|
2474
2511
|
rb_hash_aset(hp->env, g_path_info, val);
|
2475
2512
|
}
|
2476
|
-
#line
|
2513
|
+
#line 341 "unicorn_http.rl"
|
2477
2514
|
{
|
2478
2515
|
VALUE str;
|
2479
2516
|
|
@@ -2491,14 +2528,14 @@ tr119:
|
|
2491
2528
|
}
|
2492
2529
|
goto st73;
|
2493
2530
|
tr126:
|
2494
|
-
#line
|
2531
|
+
#line 360 "unicorn_http.rl"
|
2495
2532
|
{MARK(start.query, p); }
|
2496
|
-
#line
|
2533
|
+
#line 361 "unicorn_http.rl"
|
2497
2534
|
{
|
2498
2535
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
2499
2536
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
2500
2537
|
}
|
2501
|
-
#line
|
2538
|
+
#line 341 "unicorn_http.rl"
|
2502
2539
|
{
|
2503
2540
|
VALUE str;
|
2504
2541
|
|
@@ -2516,12 +2553,12 @@ tr126:
|
|
2516
2553
|
}
|
2517
2554
|
goto st73;
|
2518
2555
|
tr131:
|
2519
|
-
#line
|
2556
|
+
#line 361 "unicorn_http.rl"
|
2520
2557
|
{
|
2521
2558
|
VALIDATE_MAX_URI_LENGTH(LEN(start.query, p), QUERY_STRING);
|
2522
2559
|
rb_hash_aset(hp->env, g_query_string, STR_NEW(start.query, p));
|
2523
2560
|
}
|
2524
|
-
#line
|
2561
|
+
#line 341 "unicorn_http.rl"
|
2525
2562
|
{
|
2526
2563
|
VALUE str;
|
2527
2564
|
|
@@ -2542,7 +2579,7 @@ st73:
|
|
2542
2579
|
if ( ++p == pe )
|
2543
2580
|
goto _test_eof73;
|
2544
2581
|
case 73:
|
2545
|
-
#line
|
2582
|
+
#line 2583 "unicorn_http.c"
|
2546
2583
|
switch( (*p) ) {
|
2547
2584
|
case 10: goto tr108;
|
2548
2585
|
case 13: goto tr109;
|
@@ -2555,14 +2592,14 @@ case 73:
|
|
2555
2592
|
goto st0;
|
2556
2593
|
goto tr107;
|
2557
2594
|
tr107:
|
2558
|
-
#line
|
2595
|
+
#line 327 "unicorn_http.rl"
|
2559
2596
|
{MARK(mark, p); }
|
2560
2597
|
goto st74;
|
2561
2598
|
st74:
|
2562
2599
|
if ( ++p == pe )
|
2563
2600
|
goto _test_eof74;
|
2564
2601
|
case 74:
|
2565
|
-
#line
|
2602
|
+
#line 2603 "unicorn_http.c"
|
2566
2603
|
switch( (*p) ) {
|
2567
2604
|
case 10: goto tr112;
|
2568
2605
|
case 13: goto tr113;
|
@@ -2575,14 +2612,14 @@ case 74:
|
|
2575
2612
|
goto st0;
|
2576
2613
|
goto st74;
|
2577
2614
|
tr110:
|
2578
|
-
#line
|
2615
|
+
#line 327 "unicorn_http.rl"
|
2579
2616
|
{MARK(mark, p); }
|
2580
2617
|
goto st75;
|
2581
2618
|
st75:
|
2582
2619
|
if ( ++p == pe )
|
2583
2620
|
goto _test_eof75;
|
2584
2621
|
case 75:
|
2585
|
-
#line
|
2622
|
+
#line 2623 "unicorn_http.c"
|
2586
2623
|
if ( (*p) < 65 ) {
|
2587
2624
|
if ( 48 <= (*p) && (*p) <= 57 )
|
2588
2625
|
goto st76;
|
@@ -2606,20 +2643,20 @@ case 76:
|
|
2606
2643
|
goto st74;
|
2607
2644
|
goto st0;
|
2608
2645
|
tr102:
|
2609
|
-
#line
|
2646
|
+
#line 327 "unicorn_http.rl"
|
2610
2647
|
{MARK(mark, p); }
|
2611
2648
|
goto st77;
|
2612
2649
|
tr147:
|
2613
|
-
#line
|
2650
|
+
#line 340 "unicorn_http.rl"
|
2614
2651
|
{ rb_hash_aset(hp->env, g_http_host, STR_NEW(mark, p)); }
|
2615
|
-
#line
|
2652
|
+
#line 327 "unicorn_http.rl"
|
2616
2653
|
{MARK(mark, p); }
|
2617
2654
|
goto st77;
|
2618
2655
|
st77:
|
2619
2656
|
if ( ++p == pe )
|
2620
2657
|
goto _test_eof77;
|
2621
2658
|
case 77:
|
2622
|
-
#line
|
2659
|
+
#line 2660 "unicorn_http.c"
|
2623
2660
|
switch( (*p) ) {
|
2624
2661
|
case 10: goto tr117;
|
2625
2662
|
case 13: goto tr118;
|
@@ -2659,7 +2696,7 @@ case 79:
|
|
2659
2696
|
goto st77;
|
2660
2697
|
goto st0;
|
2661
2698
|
tr121:
|
2662
|
-
#line
|
2699
|
+
#line 366 "unicorn_http.rl"
|
2663
2700
|
{
|
2664
2701
|
VALUE val;
|
2665
2702
|
|
@@ -2675,7 +2712,7 @@ st80:
|
|
2675
2712
|
if ( ++p == pe )
|
2676
2713
|
goto _test_eof80;
|
2677
2714
|
case 80:
|
2678
|
-
#line
|
2715
|
+
#line 2716 "unicorn_http.c"
|
2679
2716
|
switch( (*p) ) {
|
2680
2717
|
case 10: goto tr124;
|
2681
2718
|
case 13: goto tr125;
|
@@ -2688,14 +2725,14 @@ case 80:
|
|
2688
2725
|
goto st0;
|
2689
2726
|
goto tr123;
|
2690
2727
|
tr123:
|
2691
|
-
#line
|
2728
|
+
#line 360 "unicorn_http.rl"
|
2692
2729
|
{MARK(start.query, p); }
|
2693
2730
|
goto st81;
|
2694
2731
|
st81:
|
2695
2732
|
if ( ++p == pe )
|
2696
2733
|
goto _test_eof81;
|
2697
2734
|
case 81:
|
2698
|
-
#line
|
2735
|
+
#line 2736 "unicorn_http.c"
|
2699
2736
|
switch( (*p) ) {
|
2700
2737
|
case 10: goto tr129;
|
2701
2738
|
case 13: goto tr130;
|
@@ -2708,14 +2745,14 @@ case 81:
|
|
2708
2745
|
goto st0;
|
2709
2746
|
goto st81;
|
2710
2747
|
tr127:
|
2711
|
-
#line
|
2748
|
+
#line 360 "unicorn_http.rl"
|
2712
2749
|
{MARK(start.query, p); }
|
2713
2750
|
goto st82;
|
2714
2751
|
st82:
|
2715
2752
|
if ( ++p == pe )
|
2716
2753
|
goto _test_eof82;
|
2717
2754
|
case 82:
|
2718
|
-
#line
|
2755
|
+
#line 2756 "unicorn_http.c"
|
2719
2756
|
if ( (*p) < 65 ) {
|
2720
2757
|
if ( 48 <= (*p) && (*p) <= 57 )
|
2721
2758
|
goto st83;
|
@@ -2739,58 +2776,58 @@ case 83:
|
|
2739
2776
|
goto st81;
|
2740
2777
|
goto st0;
|
2741
2778
|
tr103:
|
2742
|
-
#line
|
2779
|
+
#line 327 "unicorn_http.rl"
|
2743
2780
|
{MARK(mark, p); }
|
2744
|
-
#line
|
2781
|
+
#line 331 "unicorn_http.rl"
|
2745
2782
|
{ downcase_char(deconst(p)); }
|
2746
2783
|
goto st84;
|
2747
2784
|
st84:
|
2748
2785
|
if ( ++p == pe )
|
2749
2786
|
goto _test_eof84;
|
2750
2787
|
case 84:
|
2751
|
-
#line
|
2788
|
+
#line 2789 "unicorn_http.c"
|
2752
2789
|
switch( (*p) ) {
|
2753
2790
|
case 84: goto tr134;
|
2754
2791
|
case 116: goto tr134;
|
2755
2792
|
}
|
2756
2793
|
goto st0;
|
2757
2794
|
tr134:
|
2758
|
-
#line
|
2795
|
+
#line 331 "unicorn_http.rl"
|
2759
2796
|
{ downcase_char(deconst(p)); }
|
2760
2797
|
goto st85;
|
2761
2798
|
st85:
|
2762
2799
|
if ( ++p == pe )
|
2763
2800
|
goto _test_eof85;
|
2764
2801
|
case 85:
|
2765
|
-
#line
|
2802
|
+
#line 2803 "unicorn_http.c"
|
2766
2803
|
switch( (*p) ) {
|
2767
2804
|
case 84: goto tr135;
|
2768
2805
|
case 116: goto tr135;
|
2769
2806
|
}
|
2770
2807
|
goto st0;
|
2771
2808
|
tr135:
|
2772
|
-
#line
|
2809
|
+
#line 331 "unicorn_http.rl"
|
2773
2810
|
{ downcase_char(deconst(p)); }
|
2774
2811
|
goto st86;
|
2775
2812
|
st86:
|
2776
2813
|
if ( ++p == pe )
|
2777
2814
|
goto _test_eof86;
|
2778
2815
|
case 86:
|
2779
|
-
#line
|
2816
|
+
#line 2817 "unicorn_http.c"
|
2780
2817
|
switch( (*p) ) {
|
2781
2818
|
case 80: goto tr136;
|
2782
2819
|
case 112: goto tr136;
|
2783
2820
|
}
|
2784
2821
|
goto st0;
|
2785
2822
|
tr136:
|
2786
|
-
#line
|
2823
|
+
#line 331 "unicorn_http.rl"
|
2787
2824
|
{ downcase_char(deconst(p)); }
|
2788
2825
|
goto st87;
|
2789
2826
|
st87:
|
2790
2827
|
if ( ++p == pe )
|
2791
2828
|
goto _test_eof87;
|
2792
2829
|
case 87:
|
2793
|
-
#line
|
2830
|
+
#line 2831 "unicorn_http.c"
|
2794
2831
|
switch( (*p) ) {
|
2795
2832
|
case 58: goto tr137;
|
2796
2833
|
case 83: goto tr138;
|
@@ -2798,7 +2835,7 @@ case 87:
|
|
2798
2835
|
}
|
2799
2836
|
goto st0;
|
2800
2837
|
tr137:
|
2801
|
-
#line
|
2838
|
+
#line 337 "unicorn_http.rl"
|
2802
2839
|
{
|
2803
2840
|
rb_hash_aset(hp->env, g_rack_url_scheme, STR_NEW(mark, p));
|
2804
2841
|
}
|
@@ -2807,7 +2844,7 @@ st88:
|
|
2807
2844
|
if ( ++p == pe )
|
2808
2845
|
goto _test_eof88;
|
2809
2846
|
case 88:
|
2810
|
-
#line
|
2847
|
+
#line 2848 "unicorn_http.c"
|
2811
2848
|
if ( (*p) == 47 )
|
2812
2849
|
goto st89;
|
2813
2850
|
goto st0;
|
@@ -2895,14 +2932,14 @@ case 93:
|
|
2895
2932
|
goto st91;
|
2896
2933
|
goto st0;
|
2897
2934
|
tr143:
|
2898
|
-
#line
|
2935
|
+
#line 327 "unicorn_http.rl"
|
2899
2936
|
{MARK(mark, p); }
|
2900
2937
|
goto st94;
|
2901
2938
|
st94:
|
2902
2939
|
if ( ++p == pe )
|
2903
2940
|
goto _test_eof94;
|
2904
2941
|
case 94:
|
2905
|
-
#line
|
2942
|
+
#line 2943 "unicorn_http.c"
|
2906
2943
|
switch( (*p) ) {
|
2907
2944
|
case 37: goto st92;
|
2908
2945
|
case 47: goto tr147;
|
@@ -2954,14 +2991,14 @@ case 95:
|
|
2954
2991
|
goto st0;
|
2955
2992
|
goto st91;
|
2956
2993
|
tr144:
|
2957
|
-
#line
|
2994
|
+
#line 327 "unicorn_http.rl"
|
2958
2995
|
{MARK(mark, p); }
|
2959
2996
|
goto st96;
|
2960
2997
|
st96:
|
2961
2998
|
if ( ++p == pe )
|
2962
2999
|
goto _test_eof96;
|
2963
3000
|
case 96:
|
2964
|
-
#line
|
3001
|
+
#line 3002 "unicorn_http.c"
|
2965
3002
|
switch( (*p) ) {
|
2966
3003
|
case 37: goto st92;
|
2967
3004
|
case 47: goto st0;
|
@@ -3039,14 +3076,14 @@ case 98:
|
|
3039
3076
|
goto st0;
|
3040
3077
|
goto st91;
|
3041
3078
|
tr138:
|
3042
|
-
#line
|
3079
|
+
#line 331 "unicorn_http.rl"
|
3043
3080
|
{ downcase_char(deconst(p)); }
|
3044
3081
|
goto st99;
|
3045
3082
|
st99:
|
3046
3083
|
if ( ++p == pe )
|
3047
3084
|
goto _test_eof99;
|
3048
3085
|
case 99:
|
3049
|
-
#line
|
3086
|
+
#line 3087 "unicorn_http.c"
|
3050
3087
|
if ( (*p) == 58 )
|
3051
3088
|
goto tr137;
|
3052
3089
|
goto st0;
|
@@ -3066,7 +3103,7 @@ case 100:
|
|
3066
3103
|
goto tr152;
|
3067
3104
|
goto st0;
|
3068
3105
|
tr151:
|
3069
|
-
#line
|
3106
|
+
#line 376 "unicorn_http.rl"
|
3070
3107
|
{
|
3071
3108
|
hp->len.chunk = step_incr(hp->len.chunk, (*p), 16);
|
3072
3109
|
if (hp->len.chunk < 0)
|
@@ -3077,7 +3114,7 @@ st101:
|
|
3077
3114
|
if ( ++p == pe )
|
3078
3115
|
goto _test_eof101;
|
3079
3116
|
case 101:
|
3080
|
-
#line
|
3117
|
+
#line 3118 "unicorn_http.c"
|
3081
3118
|
switch( (*p) ) {
|
3082
3119
|
case 10: goto tr153;
|
3083
3120
|
case 13: goto st102;
|
@@ -3094,7 +3131,7 @@ case 101:
|
|
3094
3131
|
goto tr152;
|
3095
3132
|
goto st0;
|
3096
3133
|
tr153:
|
3097
|
-
#line
|
3134
|
+
#line 405 "unicorn_http.rl"
|
3098
3135
|
{
|
3099
3136
|
HP_FL_SET(hp, INTRAILER);
|
3100
3137
|
cs = http_parser_en_Trailers;
|
@@ -3107,7 +3144,7 @@ st123:
|
|
3107
3144
|
if ( ++p == pe )
|
3108
3145
|
goto _test_eof123;
|
3109
3146
|
case 123:
|
3110
|
-
#line
|
3147
|
+
#line 3148 "unicorn_http.c"
|
3111
3148
|
goto st0;
|
3112
3149
|
st102:
|
3113
3150
|
if ( ++p == pe )
|
@@ -3117,7 +3154,7 @@ case 102:
|
|
3117
3154
|
goto tr153;
|
3118
3155
|
goto st0;
|
3119
3156
|
tr152:
|
3120
|
-
#line
|
3157
|
+
#line 376 "unicorn_http.rl"
|
3121
3158
|
{
|
3122
3159
|
hp->len.chunk = step_incr(hp->len.chunk, (*p), 16);
|
3123
3160
|
if (hp->len.chunk < 0)
|
@@ -3128,7 +3165,7 @@ st103:
|
|
3128
3165
|
if ( ++p == pe )
|
3129
3166
|
goto _test_eof103;
|
3130
3167
|
case 103:
|
3131
|
-
#line
|
3168
|
+
#line 3169 "unicorn_http.c"
|
3132
3169
|
switch( (*p) ) {
|
3133
3170
|
case 10: goto st104;
|
3134
3171
|
case 13: goto st107;
|
@@ -3149,7 +3186,7 @@ st104:
|
|
3149
3186
|
case 104:
|
3150
3187
|
goto tr159;
|
3151
3188
|
tr159:
|
3152
|
-
#line
|
3189
|
+
#line 413 "unicorn_http.rl"
|
3153
3190
|
{
|
3154
3191
|
skip_chunk_data_hack: {
|
3155
3192
|
size_t nr = MIN((size_t)hp->len.chunk, REMAINING);
|
@@ -3171,7 +3208,7 @@ st105:
|
|
3171
3208
|
if ( ++p == pe )
|
3172
3209
|
goto _test_eof105;
|
3173
3210
|
case 105:
|
3174
|
-
#line
|
3211
|
+
#line 3212 "unicorn_http.c"
|
3175
3212
|
switch( (*p) ) {
|
3176
3213
|
case 10: goto st100;
|
3177
3214
|
case 13: goto st106;
|
@@ -3378,30 +3415,30 @@ case 113:
|
|
3378
3415
|
goto st113;
|
3379
3416
|
goto st0;
|
3380
3417
|
tr172:
|
3381
|
-
#line
|
3418
|
+
#line 333 "unicorn_http.rl"
|
3382
3419
|
{ MARK(mark, p); }
|
3383
|
-
#line
|
3420
|
+
#line 335 "unicorn_http.rl"
|
3384
3421
|
{ write_cont_value(hp, buffer, p); }
|
3385
3422
|
goto st114;
|
3386
3423
|
tr175:
|
3387
|
-
#line
|
3424
|
+
#line 335 "unicorn_http.rl"
|
3388
3425
|
{ write_cont_value(hp, buffer, p); }
|
3389
3426
|
goto st114;
|
3390
3427
|
tr182:
|
3391
|
-
#line
|
3428
|
+
#line 333 "unicorn_http.rl"
|
3392
3429
|
{ MARK(mark, p); }
|
3393
|
-
#line
|
3430
|
+
#line 334 "unicorn_http.rl"
|
3394
3431
|
{ write_value(hp, buffer, p); }
|
3395
3432
|
goto st114;
|
3396
3433
|
tr185:
|
3397
|
-
#line
|
3434
|
+
#line 334 "unicorn_http.rl"
|
3398
3435
|
{ write_value(hp, buffer, p); }
|
3399
3436
|
goto st114;
|
3400
3437
|
st114:
|
3401
3438
|
if ( ++p == pe )
|
3402
3439
|
goto _test_eof114;
|
3403
3440
|
case 114:
|
3404
|
-
#line
|
3441
|
+
#line 3442 "unicorn_http.c"
|
3405
3442
|
switch( (*p) ) {
|
3406
3443
|
case 9: goto st115;
|
3407
3444
|
case 10: goto tr167;
|
@@ -3430,14 +3467,14 @@ case 114:
|
|
3430
3467
|
goto tr169;
|
3431
3468
|
goto st0;
|
3432
3469
|
tr171:
|
3433
|
-
#line
|
3470
|
+
#line 333 "unicorn_http.rl"
|
3434
3471
|
{ MARK(mark, p); }
|
3435
3472
|
goto st115;
|
3436
3473
|
st115:
|
3437
3474
|
if ( ++p == pe )
|
3438
3475
|
goto _test_eof115;
|
3439
3476
|
case 115:
|
3440
|
-
#line
|
3477
|
+
#line 3478 "unicorn_http.c"
|
3441
3478
|
switch( (*p) ) {
|
3442
3479
|
case 9: goto tr171;
|
3443
3480
|
case 10: goto tr172;
|
@@ -3449,14 +3486,14 @@ case 115:
|
|
3449
3486
|
goto st0;
|
3450
3487
|
goto tr170;
|
3451
3488
|
tr170:
|
3452
|
-
#line
|
3489
|
+
#line 333 "unicorn_http.rl"
|
3453
3490
|
{ MARK(mark, p); }
|
3454
3491
|
goto st116;
|
3455
3492
|
st116:
|
3456
3493
|
if ( ++p == pe )
|
3457
3494
|
goto _test_eof116;
|
3458
3495
|
case 116:
|
3459
|
-
#line
|
3496
|
+
#line 3497 "unicorn_http.c"
|
3460
3497
|
switch( (*p) ) {
|
3461
3498
|
case 10: goto tr175;
|
3462
3499
|
case 13: goto tr176;
|
@@ -3469,35 +3506,35 @@ case 116:
|
|
3469
3506
|
goto st0;
|
3470
3507
|
goto st116;
|
3471
3508
|
tr173:
|
3472
|
-
#line
|
3509
|
+
#line 333 "unicorn_http.rl"
|
3473
3510
|
{ MARK(mark, p); }
|
3474
|
-
#line
|
3511
|
+
#line 335 "unicorn_http.rl"
|
3475
3512
|
{ write_cont_value(hp, buffer, p); }
|
3476
3513
|
goto st117;
|
3477
3514
|
tr176:
|
3478
|
-
#line
|
3515
|
+
#line 335 "unicorn_http.rl"
|
3479
3516
|
{ write_cont_value(hp, buffer, p); }
|
3480
3517
|
goto st117;
|
3481
3518
|
tr183:
|
3482
|
-
#line
|
3519
|
+
#line 333 "unicorn_http.rl"
|
3483
3520
|
{ MARK(mark, p); }
|
3484
|
-
#line
|
3521
|
+
#line 334 "unicorn_http.rl"
|
3485
3522
|
{ write_value(hp, buffer, p); }
|
3486
3523
|
goto st117;
|
3487
3524
|
tr186:
|
3488
|
-
#line
|
3525
|
+
#line 334 "unicorn_http.rl"
|
3489
3526
|
{ write_value(hp, buffer, p); }
|
3490
3527
|
goto st117;
|
3491
3528
|
st117:
|
3492
3529
|
if ( ++p == pe )
|
3493
3530
|
goto _test_eof117;
|
3494
3531
|
case 117:
|
3495
|
-
#line
|
3532
|
+
#line 3533 "unicorn_http.c"
|
3496
3533
|
if ( (*p) == 10 )
|
3497
3534
|
goto st114;
|
3498
3535
|
goto st0;
|
3499
3536
|
tr167:
|
3500
|
-
#line
|
3537
|
+
#line 400 "unicorn_http.rl"
|
3501
3538
|
{
|
3502
3539
|
cs = http_parser_first_final;
|
3503
3540
|
goto post_exec;
|
@@ -3507,7 +3544,7 @@ st124:
|
|
3507
3544
|
if ( ++p == pe )
|
3508
3545
|
goto _test_eof124;
|
3509
3546
|
case 124:
|
3510
|
-
#line
|
3547
|
+
#line 3548 "unicorn_http.c"
|
3511
3548
|
goto st0;
|
3512
3549
|
st118:
|
3513
3550
|
if ( ++p == pe )
|
@@ -3517,20 +3554,20 @@ case 118:
|
|
3517
3554
|
goto tr167;
|
3518
3555
|
goto st0;
|
3519
3556
|
tr169:
|
3520
|
-
#line
|
3557
|
+
#line 329 "unicorn_http.rl"
|
3521
3558
|
{ MARK(start.field, p); }
|
3522
|
-
#line
|
3559
|
+
#line 330 "unicorn_http.rl"
|
3523
3560
|
{ snake_upcase_char(deconst(p)); }
|
3524
3561
|
goto st119;
|
3525
3562
|
tr178:
|
3526
|
-
#line
|
3563
|
+
#line 330 "unicorn_http.rl"
|
3527
3564
|
{ snake_upcase_char(deconst(p)); }
|
3528
3565
|
goto st119;
|
3529
3566
|
st119:
|
3530
3567
|
if ( ++p == pe )
|
3531
3568
|
goto _test_eof119;
|
3532
3569
|
case 119:
|
3533
|
-
#line
|
3570
|
+
#line 3571 "unicorn_http.c"
|
3534
3571
|
switch( (*p) ) {
|
3535
3572
|
case 33: goto tr178;
|
3536
3573
|
case 58: goto tr179;
|
@@ -3556,18 +3593,18 @@ case 119:
|
|
3556
3593
|
goto tr178;
|
3557
3594
|
goto st0;
|
3558
3595
|
tr181:
|
3559
|
-
#line
|
3596
|
+
#line 333 "unicorn_http.rl"
|
3560
3597
|
{ MARK(mark, p); }
|
3561
3598
|
goto st120;
|
3562
3599
|
tr179:
|
3563
|
-
#line
|
3600
|
+
#line 332 "unicorn_http.rl"
|
3564
3601
|
{ hp->s.field_len = LEN(start.field, p); }
|
3565
3602
|
goto st120;
|
3566
3603
|
st120:
|
3567
3604
|
if ( ++p == pe )
|
3568
3605
|
goto _test_eof120;
|
3569
3606
|
case 120:
|
3570
|
-
#line
|
3607
|
+
#line 3608 "unicorn_http.c"
|
3571
3608
|
switch( (*p) ) {
|
3572
3609
|
case 9: goto tr181;
|
3573
3610
|
case 10: goto tr182;
|
@@ -3579,14 +3616,14 @@ case 120:
|
|
3579
3616
|
goto st0;
|
3580
3617
|
goto tr180;
|
3581
3618
|
tr180:
|
3582
|
-
#line
|
3619
|
+
#line 333 "unicorn_http.rl"
|
3583
3620
|
{ MARK(mark, p); }
|
3584
3621
|
goto st121;
|
3585
3622
|
st121:
|
3586
3623
|
if ( ++p == pe )
|
3587
3624
|
goto _test_eof121;
|
3588
3625
|
case 121:
|
3589
|
-
#line
|
3626
|
+
#line 3627 "unicorn_http.c"
|
3590
3627
|
switch( (*p) ) {
|
3591
3628
|
case 10: goto tr185;
|
3592
3629
|
case 13: goto tr186;
|
@@ -3727,7 +3764,7 @@ case 121:
|
|
3727
3764
|
_out: {}
|
3728
3765
|
}
|
3729
3766
|
|
3730
|
-
#line
|
3767
|
+
#line 474 "unicorn_http.rl"
|
3731
3768
|
post_exec: /* "_out:" also goes here */
|
3732
3769
|
if (hp->cs != http_parser_error)
|
3733
3770
|
hp->cs = cs;
|
@@ -3781,7 +3818,7 @@ static void set_url_scheme(VALUE env, VALUE *server_port)
|
|
3781
3818
|
* and X-Forwarded-Proto handling from this parser? We've had it
|
3782
3819
|
* forever and nobody has said anything against it, either.
|
3783
3820
|
* Anyways, please send comments to our public mailing list:
|
3784
|
-
* unicorn-public@
|
3821
|
+
* unicorn-public@yhbt.net (no HTML mail, no subscription necessary)
|
3785
3822
|
*/
|
3786
3823
|
scheme = rb_hash_aref(env, g_http_x_forwarded_ssl);
|
3787
3824
|
if (!NIL_P(scheme) && STR_CSTR_EQ(scheme, "on")) {
|
@@ -4225,11 +4262,8 @@ static VALUE HttpParser_rssget(VALUE self)
|
|
4225
4262
|
|
4226
4263
|
void Init_unicorn_http(void)
|
4227
4264
|
{
|
4228
|
-
|
4229
|
-
VALUE mUnicorn, cHttpParser;
|
4265
|
+
VALUE mUnicorn;
|
4230
4266
|
|
4231
|
-
mark_ary = rb_ary_new();
|
4232
|
-
rb_global_variable(&mark_ary);
|
4233
4267
|
mUnicorn = rb_define_module("Unicorn");
|
4234
4268
|
cHttpParser = rb_define_class_under(mUnicorn, "HttpParser", rb_cObject);
|
4235
4269
|
eHttpParserError =
|
@@ -4239,7 +4273,7 @@ void Init_unicorn_http(void)
|
|
4239
4273
|
e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
|
4240
4274
|
eHttpParserError);
|
4241
4275
|
|
4242
|
-
init_globals(
|
4276
|
+
init_globals();
|
4243
4277
|
rb_define_alloc_func(cHttpParser, HttpParser_alloc);
|
4244
4278
|
rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);
|
4245
4279
|
rb_define_method(cHttpParser, "clear", HttpParser_clear, 0);
|
@@ -4276,19 +4310,18 @@ void Init_unicorn_http(void)
|
|
4276
4310
|
|
4277
4311
|
rb_define_singleton_method(cHttpParser, "max_header_len=", set_maxhdrlen, 1);
|
4278
4312
|
|
4279
|
-
init_common_fields(
|
4313
|
+
init_common_fields();
|
4280
4314
|
SET_GLOBAL(g_http_host, "HOST");
|
4281
4315
|
SET_GLOBAL(g_http_trailer, "TRAILER");
|
4282
4316
|
SET_GLOBAL(g_http_transfer_encoding, "TRANSFER_ENCODING");
|
4283
4317
|
SET_GLOBAL(g_content_length, "CONTENT_LENGTH");
|
4284
4318
|
SET_GLOBAL(g_http_connection, "CONNECTION");
|
4285
4319
|
id_set_backtrace = rb_intern("set_backtrace");
|
4286
|
-
init_unicorn_httpdate(
|
4287
|
-
|
4288
|
-
OBJ_FREEZE(mark_ary);
|
4320
|
+
init_unicorn_httpdate();
|
4289
4321
|
|
4290
4322
|
#ifndef HAVE_RB_HASH_CLEAR
|
4291
4323
|
id_clear = rb_intern("clear");
|
4292
4324
|
#endif
|
4325
|
+
id_is_chunked_p = rb_intern("is_chunked?");
|
4293
4326
|
}
|
4294
4327
|
#undef SET_GLOBAL
|