puma 5.0.0-java → 5.0.1-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.md +1126 -574
- data/ext/puma_http11/http11_parser.c +64 -64
- data/lib/puma.rb +5 -2
- data/lib/puma/binder.rb +2 -0
- data/lib/puma/client.rb +5 -1
- data/lib/puma/cluster.rb +2 -0
- data/lib/puma/const.rb +1 -1
- data/lib/puma/error_logger.rb +2 -2
- data/lib/puma/events.rb +5 -3
- data/lib/puma/launcher.rb +8 -0
- data/lib/puma/minissl.rb +8 -0
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/reactor.rb +2 -13
- data/lib/puma/runner.rb +4 -17
- data/lib/puma/server.rb +92 -64
- data/lib/puma/single.rb +1 -0
- data/lib/puma/thread_pool.rb +22 -2
- data/lib/puma/util.rb +1 -0
- metadata +2 -2
@@ -33,12 +33,12 @@ static void snake_upcase_char(char *c)
|
|
33
33
|
/** Machine **/
|
34
34
|
|
35
35
|
|
36
|
-
#line
|
36
|
+
#line 81 "ext/puma_http11/http11_parser.rl"
|
37
37
|
|
38
38
|
|
39
39
|
/** Data **/
|
40
40
|
|
41
|
-
#line
|
41
|
+
#line 42 "ext/puma_http11/http11_parser.c"
|
42
42
|
static const int puma_parser_start = 1;
|
43
43
|
static const int puma_parser_first_final = 46;
|
44
44
|
static const int puma_parser_error = 0;
|
@@ -46,17 +46,17 @@ static const int puma_parser_error = 0;
|
|
46
46
|
static const int puma_parser_en_main = 1;
|
47
47
|
|
48
48
|
|
49
|
-
#line
|
49
|
+
#line 85 "ext/puma_http11/http11_parser.rl"
|
50
50
|
|
51
51
|
int puma_parser_init(puma_parser *parser) {
|
52
52
|
int cs = 0;
|
53
53
|
|
54
|
-
#line
|
54
|
+
#line 55 "ext/puma_http11/http11_parser.c"
|
55
55
|
{
|
56
56
|
cs = puma_parser_start;
|
57
57
|
}
|
58
58
|
|
59
|
-
#line
|
59
|
+
#line 89 "ext/puma_http11/http11_parser.rl"
|
60
60
|
parser->cs = cs;
|
61
61
|
parser->body_start = 0;
|
62
62
|
parser->content_len = 0;
|
@@ -85,7 +85,7 @@ size_t puma_parser_execute(puma_parser *parser, const char *buffer, size_t len,
|
|
85
85
|
assert((size_t) (pe - p) == len - off && "pointers aren't same distance");
|
86
86
|
|
87
87
|
|
88
|
-
#line
|
88
|
+
#line 89 "ext/puma_http11/http11_parser.c"
|
89
89
|
{
|
90
90
|
if ( p == pe )
|
91
91
|
goto _test_eof;
|
@@ -109,14 +109,14 @@ st0:
|
|
109
109
|
cs = 0;
|
110
110
|
goto _out;
|
111
111
|
tr0:
|
112
|
-
#line
|
112
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
113
113
|
{ MARK(mark, p); }
|
114
114
|
goto st2;
|
115
115
|
st2:
|
116
116
|
if ( ++p == pe )
|
117
117
|
goto _test_eof2;
|
118
118
|
case 2:
|
119
|
-
#line
|
119
|
+
#line 120 "ext/puma_http11/http11_parser.c"
|
120
120
|
switch( (*p) ) {
|
121
121
|
case 32: goto tr2;
|
122
122
|
case 36: goto st27;
|
@@ -132,7 +132,7 @@ case 2:
|
|
132
132
|
goto st27;
|
133
133
|
goto st0;
|
134
134
|
tr2:
|
135
|
-
#line
|
135
|
+
#line 50 "ext/puma_http11/http11_parser.rl"
|
136
136
|
{
|
137
137
|
parser->request_method(parser, PTR_TO(mark), LEN(mark, p));
|
138
138
|
}
|
@@ -141,7 +141,7 @@ st3:
|
|
141
141
|
if ( ++p == pe )
|
142
142
|
goto _test_eof3;
|
143
143
|
case 3:
|
144
|
-
#line
|
144
|
+
#line 145 "ext/puma_http11/http11_parser.c"
|
145
145
|
switch( (*p) ) {
|
146
146
|
case 42: goto tr4;
|
147
147
|
case 43: goto tr5;
|
@@ -158,67 +158,67 @@ case 3:
|
|
158
158
|
goto tr5;
|
159
159
|
goto st0;
|
160
160
|
tr4:
|
161
|
-
#line
|
161
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
162
162
|
{ MARK(mark, p); }
|
163
163
|
goto st4;
|
164
164
|
st4:
|
165
165
|
if ( ++p == pe )
|
166
166
|
goto _test_eof4;
|
167
167
|
case 4:
|
168
|
-
#line
|
168
|
+
#line 169 "ext/puma_http11/http11_parser.c"
|
169
169
|
switch( (*p) ) {
|
170
170
|
case 32: goto tr8;
|
171
171
|
case 35: goto tr9;
|
172
172
|
}
|
173
173
|
goto st0;
|
174
174
|
tr8:
|
175
|
-
#line
|
175
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
176
176
|
{
|
177
177
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
178
178
|
}
|
179
179
|
goto st5;
|
180
180
|
tr31:
|
181
|
-
#line
|
181
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
182
182
|
{ MARK(mark, p); }
|
183
|
-
#line
|
183
|
+
#line 56 "ext/puma_http11/http11_parser.rl"
|
184
184
|
{
|
185
185
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
186
186
|
}
|
187
187
|
goto st5;
|
188
188
|
tr33:
|
189
|
-
#line
|
189
|
+
#line 56 "ext/puma_http11/http11_parser.rl"
|
190
190
|
{
|
191
191
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
192
192
|
}
|
193
193
|
goto st5;
|
194
194
|
tr37:
|
195
|
-
#line
|
195
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
196
196
|
{
|
197
197
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
198
198
|
}
|
199
|
-
#line
|
199
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
200
200
|
{
|
201
201
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
202
202
|
}
|
203
203
|
goto st5;
|
204
204
|
tr41:
|
205
|
-
#line
|
205
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
206
206
|
{ MARK(query_start, p); }
|
207
|
-
#line
|
207
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
208
208
|
{
|
209
209
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
210
210
|
}
|
211
|
-
#line
|
211
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
212
212
|
{
|
213
213
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
214
214
|
}
|
215
215
|
goto st5;
|
216
216
|
tr44:
|
217
|
-
#line
|
217
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
218
218
|
{
|
219
219
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
220
220
|
}
|
221
|
-
#line
|
221
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
222
222
|
{
|
223
223
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
224
224
|
}
|
@@ -227,19 +227,19 @@ st5:
|
|
227
227
|
if ( ++p == pe )
|
228
228
|
goto _test_eof5;
|
229
229
|
case 5:
|
230
|
-
#line
|
230
|
+
#line 231 "ext/puma_http11/http11_parser.c"
|
231
231
|
if ( (*p) == 72 )
|
232
232
|
goto tr10;
|
233
233
|
goto st0;
|
234
234
|
tr10:
|
235
|
-
#line
|
235
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
236
236
|
{ MARK(mark, p); }
|
237
237
|
goto st6;
|
238
238
|
st6:
|
239
239
|
if ( ++p == pe )
|
240
240
|
goto _test_eof6;
|
241
241
|
case 6:
|
242
|
-
#line
|
242
|
+
#line 243 "ext/puma_http11/http11_parser.c"
|
243
243
|
if ( (*p) == 84 )
|
244
244
|
goto st7;
|
245
245
|
goto st0;
|
@@ -297,21 +297,21 @@ case 13:
|
|
297
297
|
goto st13;
|
298
298
|
goto st0;
|
299
299
|
tr18:
|
300
|
-
#line
|
300
|
+
#line 65 "ext/puma_http11/http11_parser.rl"
|
301
301
|
{
|
302
302
|
parser->http_version(parser, PTR_TO(mark), LEN(mark, p));
|
303
303
|
}
|
304
304
|
goto st14;
|
305
305
|
tr26:
|
306
|
-
#line
|
306
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
307
307
|
{ MARK(mark, p); }
|
308
|
-
#line
|
308
|
+
#line 47 "ext/puma_http11/http11_parser.rl"
|
309
309
|
{
|
310
310
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
311
311
|
}
|
312
312
|
goto st14;
|
313
313
|
tr29:
|
314
|
-
#line
|
314
|
+
#line 47 "ext/puma_http11/http11_parser.rl"
|
315
315
|
{
|
316
316
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
317
317
|
}
|
@@ -320,7 +320,7 @@ st14:
|
|
320
320
|
if ( ++p == pe )
|
321
321
|
goto _test_eof14;
|
322
322
|
case 14:
|
323
|
-
#line
|
323
|
+
#line 324 "ext/puma_http11/http11_parser.c"
|
324
324
|
if ( (*p) == 10 )
|
325
325
|
goto st15;
|
326
326
|
goto st0;
|
@@ -360,7 +360,7 @@ case 16:
|
|
360
360
|
goto tr22;
|
361
361
|
goto st0;
|
362
362
|
tr22:
|
363
|
-
#line
|
363
|
+
#line 73 "ext/puma_http11/http11_parser.rl"
|
364
364
|
{
|
365
365
|
parser->body_start = p - buffer + 1;
|
366
366
|
parser->header_done(parser, p + 1, pe - p - 1);
|
@@ -371,23 +371,23 @@ st46:
|
|
371
371
|
if ( ++p == pe )
|
372
372
|
goto _test_eof46;
|
373
373
|
case 46:
|
374
|
-
#line
|
374
|
+
#line 375 "ext/puma_http11/http11_parser.c"
|
375
375
|
goto st0;
|
376
376
|
tr21:
|
377
|
-
#line
|
377
|
+
#line 40 "ext/puma_http11/http11_parser.rl"
|
378
378
|
{ MARK(field_start, p); }
|
379
|
-
#line
|
379
|
+
#line 41 "ext/puma_http11/http11_parser.rl"
|
380
380
|
{ snake_upcase_char((char *)p); }
|
381
381
|
goto st17;
|
382
382
|
tr23:
|
383
|
-
#line
|
383
|
+
#line 41 "ext/puma_http11/http11_parser.rl"
|
384
384
|
{ snake_upcase_char((char *)p); }
|
385
385
|
goto st17;
|
386
386
|
st17:
|
387
387
|
if ( ++p == pe )
|
388
388
|
goto _test_eof17;
|
389
389
|
case 17:
|
390
|
-
#line
|
390
|
+
#line 391 "ext/puma_http11/http11_parser.c"
|
391
391
|
switch( (*p) ) {
|
392
392
|
case 33: goto tr23;
|
393
393
|
case 58: goto tr24;
|
@@ -413,71 +413,71 @@ case 17:
|
|
413
413
|
goto tr23;
|
414
414
|
goto st0;
|
415
415
|
tr24:
|
416
|
-
#line
|
416
|
+
#line 42 "ext/puma_http11/http11_parser.rl"
|
417
417
|
{
|
418
418
|
parser->field_len = LEN(field_start, p);
|
419
419
|
}
|
420
420
|
goto st18;
|
421
421
|
tr27:
|
422
|
-
#line
|
422
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
423
423
|
{ MARK(mark, p); }
|
424
424
|
goto st18;
|
425
425
|
st18:
|
426
426
|
if ( ++p == pe )
|
427
427
|
goto _test_eof18;
|
428
428
|
case 18:
|
429
|
-
#line
|
429
|
+
#line 430 "ext/puma_http11/http11_parser.c"
|
430
430
|
switch( (*p) ) {
|
431
431
|
case 13: goto tr26;
|
432
432
|
case 32: goto tr27;
|
433
433
|
}
|
434
434
|
goto tr25;
|
435
435
|
tr25:
|
436
|
-
#line
|
436
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
437
437
|
{ MARK(mark, p); }
|
438
438
|
goto st19;
|
439
439
|
st19:
|
440
440
|
if ( ++p == pe )
|
441
441
|
goto _test_eof19;
|
442
442
|
case 19:
|
443
|
-
#line
|
443
|
+
#line 444 "ext/puma_http11/http11_parser.c"
|
444
444
|
if ( (*p) == 13 )
|
445
445
|
goto tr29;
|
446
446
|
goto st19;
|
447
447
|
tr9:
|
448
|
-
#line
|
448
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
449
449
|
{
|
450
450
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
451
451
|
}
|
452
452
|
goto st20;
|
453
453
|
tr38:
|
454
|
-
#line
|
454
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
455
455
|
{
|
456
456
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
457
457
|
}
|
458
|
-
#line
|
458
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
459
459
|
{
|
460
460
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
461
461
|
}
|
462
462
|
goto st20;
|
463
463
|
tr42:
|
464
|
-
#line
|
464
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
465
465
|
{ MARK(query_start, p); }
|
466
|
-
#line
|
466
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
467
467
|
{
|
468
468
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
469
469
|
}
|
470
|
-
#line
|
470
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
471
471
|
{
|
472
472
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
473
473
|
}
|
474
474
|
goto st20;
|
475
475
|
tr45:
|
476
|
-
#line
|
476
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
477
477
|
{
|
478
478
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
479
479
|
}
|
480
|
-
#line
|
480
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
481
481
|
{
|
482
482
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
483
483
|
}
|
@@ -486,7 +486,7 @@ st20:
|
|
486
486
|
if ( ++p == pe )
|
487
487
|
goto _test_eof20;
|
488
488
|
case 20:
|
489
|
-
#line
|
489
|
+
#line 490 "ext/puma_http11/http11_parser.c"
|
490
490
|
switch( (*p) ) {
|
491
491
|
case 32: goto tr31;
|
492
492
|
case 60: goto st0;
|
@@ -500,14 +500,14 @@ case 20:
|
|
500
500
|
goto st0;
|
501
501
|
goto tr30;
|
502
502
|
tr30:
|
503
|
-
#line
|
503
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
504
504
|
{ MARK(mark, p); }
|
505
505
|
goto st21;
|
506
506
|
st21:
|
507
507
|
if ( ++p == pe )
|
508
508
|
goto _test_eof21;
|
509
509
|
case 21:
|
510
|
-
#line
|
510
|
+
#line 511 "ext/puma_http11/http11_parser.c"
|
511
511
|
switch( (*p) ) {
|
512
512
|
case 32: goto tr33;
|
513
513
|
case 60: goto st0;
|
@@ -521,14 +521,14 @@ case 21:
|
|
521
521
|
goto st0;
|
522
522
|
goto st21;
|
523
523
|
tr5:
|
524
|
-
#line
|
524
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
525
525
|
{ MARK(mark, p); }
|
526
526
|
goto st22;
|
527
527
|
st22:
|
528
528
|
if ( ++p == pe )
|
529
529
|
goto _test_eof22;
|
530
530
|
case 22:
|
531
|
-
#line
|
531
|
+
#line 532 "ext/puma_http11/http11_parser.c"
|
532
532
|
switch( (*p) ) {
|
533
533
|
case 43: goto st22;
|
534
534
|
case 58: goto st23;
|
@@ -546,14 +546,14 @@ case 22:
|
|
546
546
|
goto st22;
|
547
547
|
goto st0;
|
548
548
|
tr7:
|
549
|
-
#line
|
549
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
550
550
|
{ MARK(mark, p); }
|
551
551
|
goto st23;
|
552
552
|
st23:
|
553
553
|
if ( ++p == pe )
|
554
554
|
goto _test_eof23;
|
555
555
|
case 23:
|
556
|
-
#line
|
556
|
+
#line 557 "ext/puma_http11/http11_parser.c"
|
557
557
|
switch( (*p) ) {
|
558
558
|
case 32: goto tr8;
|
559
559
|
case 34: goto st0;
|
@@ -566,14 +566,14 @@ case 23:
|
|
566
566
|
goto st0;
|
567
567
|
goto st23;
|
568
568
|
tr6:
|
569
|
-
#line
|
569
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
570
570
|
{ MARK(mark, p); }
|
571
571
|
goto st24;
|
572
572
|
st24:
|
573
573
|
if ( ++p == pe )
|
574
574
|
goto _test_eof24;
|
575
575
|
case 24:
|
576
|
-
#line
|
576
|
+
#line 577 "ext/puma_http11/http11_parser.c"
|
577
577
|
switch( (*p) ) {
|
578
578
|
case 32: goto tr37;
|
579
579
|
case 34: goto st0;
|
@@ -587,7 +587,7 @@ case 24:
|
|
587
587
|
goto st0;
|
588
588
|
goto st24;
|
589
589
|
tr39:
|
590
|
-
#line
|
590
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
591
591
|
{
|
592
592
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
593
593
|
}
|
@@ -596,7 +596,7 @@ st25:
|
|
596
596
|
if ( ++p == pe )
|
597
597
|
goto _test_eof25;
|
598
598
|
case 25:
|
599
|
-
#line
|
599
|
+
#line 600 "ext/puma_http11/http11_parser.c"
|
600
600
|
switch( (*p) ) {
|
601
601
|
case 32: goto tr41;
|
602
602
|
case 34: goto st0;
|
@@ -609,14 +609,14 @@ case 25:
|
|
609
609
|
goto st0;
|
610
610
|
goto tr40;
|
611
611
|
tr40:
|
612
|
-
#line
|
612
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
613
613
|
{ MARK(query_start, p); }
|
614
614
|
goto st26;
|
615
615
|
st26:
|
616
616
|
if ( ++p == pe )
|
617
617
|
goto _test_eof26;
|
618
618
|
case 26:
|
619
|
-
#line
|
619
|
+
#line 620 "ext/puma_http11/http11_parser.c"
|
620
620
|
switch( (*p) ) {
|
621
621
|
case 32: goto tr44;
|
622
622
|
case 34: goto st0;
|
@@ -1010,7 +1010,7 @@ case 45:
|
|
1010
1010
|
_out: {}
|
1011
1011
|
}
|
1012
1012
|
|
1013
|
-
#line
|
1013
|
+
#line 117 "ext/puma_http11/http11_parser.rl"
|
1014
1014
|
|
1015
1015
|
if (!puma_parser_has_error(parser))
|
1016
1016
|
parser->cs = cs;
|