puma 3.8.2 → 4.3.12
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 +5 -5
- data/History.md +305 -0
- data/LICENSE +0 -0
- data/README.md +162 -224
- data/bin/puma-wild +0 -0
- data/docs/architecture.md +37 -0
- data/{DEPLOYMENT.md → docs/deployment.md} +24 -4
- data/docs/images/puma-connection-flow-no-reactor.png +0 -0
- data/docs/images/puma-connection-flow.png +0 -0
- data/docs/images/puma-general-arch.png +0 -0
- data/docs/nginx.md +0 -0
- data/docs/plugins.md +38 -0
- data/docs/restart.md +41 -0
- data/docs/signals.md +56 -3
- data/docs/systemd.md +130 -37
- data/docs/tcp_mode.md +96 -0
- data/ext/puma_http11/PumaHttp11Service.java +2 -0
- data/ext/puma_http11/ext_help.h +0 -0
- data/ext/puma_http11/extconf.rb +21 -0
- data/ext/puma_http11/http11_parser.c +134 -144
- data/ext/puma_http11/http11_parser.h +0 -0
- data/ext/puma_http11/http11_parser.java.rl +21 -37
- data/ext/puma_http11/http11_parser.rl +12 -10
- data/ext/puma_http11/http11_parser_common.rl +4 -4
- data/ext/puma_http11/io_buffer.c +0 -0
- data/ext/puma_http11/mini_ssl.c +165 -34
- data/ext/puma_http11/org/jruby/puma/Http11.java +106 -114
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +85 -101
- data/ext/puma_http11/org/jruby/puma/IOBuffer.java +72 -0
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +30 -6
- data/ext/puma_http11/puma_http11.c +3 -0
- data/lib/puma/accept_nonblock.rb +7 -1
- data/lib/puma/app/status.rb +42 -26
- data/lib/puma/binder.rb +57 -74
- data/lib/puma/cli.rb +26 -7
- data/lib/puma/client.rb +307 -191
- data/lib/puma/cluster.rb +78 -34
- data/lib/puma/commonlogger.rb +2 -0
- data/lib/puma/configuration.rb +24 -16
- data/lib/puma/const.rb +41 -20
- data/lib/puma/control_cli.rb +46 -19
- data/lib/puma/detect.rb +2 -0
- data/lib/puma/dsl.rb +329 -68
- data/lib/puma/events.rb +6 -2
- data/lib/puma/io_buffer.rb +3 -6
- data/lib/puma/jruby_restart.rb +2 -1
- data/lib/puma/launcher.rb +125 -61
- data/lib/puma/minissl/context_builder.rb +76 -0
- data/lib/puma/minissl.rb +85 -28
- data/lib/puma/null_io.rb +2 -0
- data/lib/puma/plugin/tmp_restart.rb +2 -1
- data/lib/puma/plugin.rb +7 -2
- data/lib/puma/rack/builder.rb +4 -1
- data/lib/puma/rack/urlmap.rb +2 -0
- data/lib/puma/rack_default.rb +2 -0
- data/lib/puma/reactor.rb +224 -34
- data/lib/puma/runner.rb +27 -6
- data/lib/puma/server.rb +212 -68
- data/lib/puma/single.rb +16 -5
- data/lib/puma/state_file.rb +2 -0
- data/lib/puma/tcp_logger.rb +2 -0
- data/lib/puma/thread_pool.rb +67 -36
- data/lib/puma/util.rb +2 -6
- data/lib/puma.rb +16 -0
- data/lib/rack/handler/puma.rb +16 -5
- data/tools/docker/Dockerfile +16 -0
- data/tools/jungle/README.md +12 -2
- data/tools/jungle/init.d/README.md +2 -0
- data/tools/jungle/init.d/puma +8 -8
- data/tools/jungle/init.d/run-puma +1 -1
- data/tools/jungle/rc.d/README.md +74 -0
- data/tools/jungle/rc.d/puma +61 -0
- data/tools/jungle/rc.d/puma.conf +10 -0
- data/tools/jungle/upstart/README.md +0 -0
- data/tools/jungle/upstart/puma-manager.conf +0 -0
- data/tools/jungle/upstart/puma.conf +0 -0
- data/tools/trickletest.rb +1 -2
- metadata +32 -93
- data/.github/issue_template.md +0 -20
- data/Gemfile +0 -12
- data/Manifest.txt +0 -78
- data/Rakefile +0 -158
- data/Release.md +0 -9
- data/gemfiles/2.1-Gemfile +0 -12
- data/lib/puma/compat.rb +0 -14
- data/lib/puma/convenient.rb +0 -23
- data/lib/puma/daemon_ext.rb +0 -31
- data/lib/puma/delegation.rb +0 -11
- data/lib/puma/java_io_buffer.rb +0 -45
- data/lib/puma/rack/backports/uri/common_193.rb +0 -33
- data/puma.gemspec +0 -52
@@ -14,12 +14,14 @@
|
|
14
14
|
|
15
15
|
/*
|
16
16
|
* capitalizes all lower-case ASCII characters,
|
17
|
-
* converts dashes to underscores.
|
17
|
+
* converts dashes to underscores, and underscores to commas.
|
18
18
|
*/
|
19
19
|
static void snake_upcase_char(char *c)
|
20
20
|
{
|
21
21
|
if (*c >= 'a' && *c <= 'z')
|
22
22
|
*c &= ~0x20;
|
23
|
+
else if (*c == '_')
|
24
|
+
*c = ',';
|
23
25
|
else if (*c == '-')
|
24
26
|
*c = '_';
|
25
27
|
}
|
@@ -31,30 +33,30 @@ static void snake_upcase_char(char *c)
|
|
31
33
|
/** Machine **/
|
32
34
|
|
33
35
|
|
34
|
-
#line
|
36
|
+
#line 79 "ext/puma_http11/http11_parser.rl"
|
35
37
|
|
36
38
|
|
37
39
|
/** Data **/
|
38
40
|
|
39
|
-
#line
|
41
|
+
#line 40 "ext/puma_http11/http11_parser.c"
|
40
42
|
static const int puma_parser_start = 1;
|
41
|
-
static const int puma_parser_first_final =
|
43
|
+
static const int puma_parser_first_final = 46;
|
42
44
|
static const int puma_parser_error = 0;
|
43
45
|
|
44
46
|
static const int puma_parser_en_main = 1;
|
45
47
|
|
46
48
|
|
47
|
-
#line
|
49
|
+
#line 83 "ext/puma_http11/http11_parser.rl"
|
48
50
|
|
49
51
|
int puma_parser_init(puma_parser *parser) {
|
50
52
|
int cs = 0;
|
51
53
|
|
52
|
-
#line
|
54
|
+
#line 53 "ext/puma_http11/http11_parser.c"
|
53
55
|
{
|
54
56
|
cs = puma_parser_start;
|
55
57
|
}
|
56
58
|
|
57
|
-
#line
|
59
|
+
#line 87 "ext/puma_http11/http11_parser.rl"
|
58
60
|
parser->cs = cs;
|
59
61
|
parser->body_start = 0;
|
60
62
|
parser->content_len = 0;
|
@@ -80,10 +82,10 @@ size_t puma_parser_execute(puma_parser *parser, const char *buffer, size_t len,
|
|
80
82
|
pe = buffer+len;
|
81
83
|
|
82
84
|
/* assert(*pe == '\0' && "pointer does not end on NUL"); */
|
83
|
-
assert(pe - p == len - off && "pointers aren't same distance");
|
85
|
+
assert((size_t) (pe - p) == len - off && "pointers aren't same distance");
|
84
86
|
|
85
87
|
|
86
|
-
#line
|
88
|
+
#line 87 "ext/puma_http11/http11_parser.c"
|
87
89
|
{
|
88
90
|
if ( p == pe )
|
89
91
|
goto _test_eof;
|
@@ -107,31 +109,31 @@ st0:
|
|
107
109
|
cs = 0;
|
108
110
|
goto _out;
|
109
111
|
tr0:
|
110
|
-
#line
|
112
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
111
113
|
{ MARK(mark, p); }
|
112
114
|
goto st2;
|
113
115
|
st2:
|
114
116
|
if ( ++p == pe )
|
115
117
|
goto _test_eof2;
|
116
118
|
case 2:
|
117
|
-
#line
|
119
|
+
#line 118 "ext/puma_http11/http11_parser.c"
|
118
120
|
switch( (*p) ) {
|
119
121
|
case 32: goto tr2;
|
120
|
-
case 36: goto
|
121
|
-
case 95: goto
|
122
|
+
case 36: goto st27;
|
123
|
+
case 95: goto st27;
|
122
124
|
}
|
123
125
|
if ( (*p) < 48 ) {
|
124
126
|
if ( 45 <= (*p) && (*p) <= 46 )
|
125
|
-
goto
|
127
|
+
goto st27;
|
126
128
|
} else if ( (*p) > 57 ) {
|
127
129
|
if ( 65 <= (*p) && (*p) <= 90 )
|
128
|
-
goto
|
130
|
+
goto st27;
|
129
131
|
} else
|
130
|
-
goto
|
132
|
+
goto st27;
|
131
133
|
goto st0;
|
132
134
|
tr2:
|
133
|
-
#line
|
134
|
-
{
|
135
|
+
#line 48 "ext/puma_http11/http11_parser.rl"
|
136
|
+
{
|
135
137
|
parser->request_method(parser, PTR_TO(mark), LEN(mark, p));
|
136
138
|
}
|
137
139
|
goto st3;
|
@@ -139,7 +141,7 @@ st3:
|
|
139
141
|
if ( ++p == pe )
|
140
142
|
goto _test_eof3;
|
141
143
|
case 3:
|
142
|
-
#line
|
144
|
+
#line 143 "ext/puma_http11/http11_parser.c"
|
143
145
|
switch( (*p) ) {
|
144
146
|
case 42: goto tr4;
|
145
147
|
case 43: goto tr5;
|
@@ -156,68 +158,68 @@ case 3:
|
|
156
158
|
goto tr5;
|
157
159
|
goto st0;
|
158
160
|
tr4:
|
159
|
-
#line
|
161
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
160
162
|
{ MARK(mark, p); }
|
161
163
|
goto st4;
|
162
164
|
st4:
|
163
165
|
if ( ++p == pe )
|
164
166
|
goto _test_eof4;
|
165
167
|
case 4:
|
166
|
-
#line
|
168
|
+
#line 167 "ext/puma_http11/http11_parser.c"
|
167
169
|
switch( (*p) ) {
|
168
170
|
case 32: goto tr8;
|
169
171
|
case 35: goto tr9;
|
170
172
|
}
|
171
173
|
goto st0;
|
172
174
|
tr8:
|
173
|
-
#line
|
174
|
-
{
|
175
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
176
|
+
{
|
175
177
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
176
178
|
}
|
177
179
|
goto st5;
|
178
180
|
tr31:
|
179
|
-
#line
|
181
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
180
182
|
{ MARK(mark, p); }
|
181
|
-
#line
|
183
|
+
#line 54 "ext/puma_http11/http11_parser.rl"
|
182
184
|
{
|
183
185
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
184
186
|
}
|
185
187
|
goto st5;
|
186
188
|
tr33:
|
187
|
-
#line
|
189
|
+
#line 54 "ext/puma_http11/http11_parser.rl"
|
188
190
|
{
|
189
191
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
190
192
|
}
|
191
193
|
goto st5;
|
192
194
|
tr37:
|
193
|
-
#line
|
195
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
194
196
|
{
|
195
197
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
196
198
|
}
|
197
|
-
#line
|
198
|
-
{
|
199
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
200
|
+
{
|
199
201
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
200
202
|
}
|
201
203
|
goto st5;
|
202
|
-
|
203
|
-
#line 57 "ext/puma_http11/http11_parser.rl"
|
204
|
-
{ MARK(query_start, p); }
|
204
|
+
tr41:
|
205
205
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
206
|
-
{
|
206
|
+
{ MARK(query_start, p); }
|
207
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
208
|
+
{
|
207
209
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
208
210
|
}
|
209
|
-
#line
|
210
|
-
{
|
211
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
212
|
+
{
|
211
213
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
212
214
|
}
|
213
215
|
goto st5;
|
214
|
-
|
215
|
-
#line
|
216
|
-
{
|
216
|
+
tr44:
|
217
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
218
|
+
{
|
217
219
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
218
220
|
}
|
219
|
-
#line
|
220
|
-
{
|
221
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
222
|
+
{
|
221
223
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
222
224
|
}
|
223
225
|
goto st5;
|
@@ -225,19 +227,19 @@ st5:
|
|
225
227
|
if ( ++p == pe )
|
226
228
|
goto _test_eof5;
|
227
229
|
case 5:
|
228
|
-
#line
|
230
|
+
#line 229 "ext/puma_http11/http11_parser.c"
|
229
231
|
if ( (*p) == 72 )
|
230
232
|
goto tr10;
|
231
233
|
goto st0;
|
232
234
|
tr10:
|
233
|
-
#line
|
235
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
234
236
|
{ MARK(mark, p); }
|
235
237
|
goto st6;
|
236
238
|
st6:
|
237
239
|
if ( ++p == pe )
|
238
240
|
goto _test_eof6;
|
239
241
|
case 6:
|
240
|
-
#line
|
242
|
+
#line 241 "ext/puma_http11/http11_parser.c"
|
241
243
|
if ( (*p) == 84 )
|
242
244
|
goto st7;
|
243
245
|
goto st0;
|
@@ -295,21 +297,21 @@ case 13:
|
|
295
297
|
goto st13;
|
296
298
|
goto st0;
|
297
299
|
tr18:
|
298
|
-
#line
|
299
|
-
{
|
300
|
+
#line 63 "ext/puma_http11/http11_parser.rl"
|
301
|
+
{
|
300
302
|
parser->http_version(parser, PTR_TO(mark), LEN(mark, p));
|
301
303
|
}
|
302
304
|
goto st14;
|
303
305
|
tr26:
|
304
|
-
#line 43 "ext/puma_http11/http11_parser.rl"
|
305
|
-
{ MARK(mark, p); }
|
306
306
|
#line 44 "ext/puma_http11/http11_parser.rl"
|
307
|
+
{ MARK(mark, p); }
|
308
|
+
#line 45 "ext/puma_http11/http11_parser.rl"
|
307
309
|
{
|
308
310
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
309
311
|
}
|
310
312
|
goto st14;
|
311
313
|
tr29:
|
312
|
-
#line
|
314
|
+
#line 45 "ext/puma_http11/http11_parser.rl"
|
313
315
|
{
|
314
316
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
315
317
|
}
|
@@ -318,7 +320,7 @@ st14:
|
|
318
320
|
if ( ++p == pe )
|
319
321
|
goto _test_eof14;
|
320
322
|
case 14:
|
321
|
-
#line
|
323
|
+
#line 322 "ext/puma_http11/http11_parser.c"
|
322
324
|
if ( (*p) == 10 )
|
323
325
|
goto st15;
|
324
326
|
goto st0;
|
@@ -358,34 +360,34 @@ case 16:
|
|
358
360
|
goto tr22;
|
359
361
|
goto st0;
|
360
362
|
tr22:
|
361
|
-
#line
|
362
|
-
{
|
363
|
-
parser->body_start = p - buffer + 1;
|
363
|
+
#line 71 "ext/puma_http11/http11_parser.rl"
|
364
|
+
{
|
365
|
+
parser->body_start = p - buffer + 1;
|
364
366
|
parser->header_done(parser, p + 1, pe - p - 1);
|
365
|
-
{p++; cs =
|
367
|
+
{p++; cs = 46; goto _out;}
|
366
368
|
}
|
367
|
-
goto
|
368
|
-
|
369
|
+
goto st46;
|
370
|
+
st46:
|
369
371
|
if ( ++p == pe )
|
370
|
-
goto
|
371
|
-
case
|
372
|
-
#line
|
372
|
+
goto _test_eof46;
|
373
|
+
case 46:
|
374
|
+
#line 373 "ext/puma_http11/http11_parser.c"
|
373
375
|
goto st0;
|
374
376
|
tr21:
|
375
|
-
#line 37 "ext/puma_http11/http11_parser.rl"
|
376
|
-
{ MARK(field_start, p); }
|
377
377
|
#line 38 "ext/puma_http11/http11_parser.rl"
|
378
|
+
{ MARK(field_start, p); }
|
379
|
+
#line 39 "ext/puma_http11/http11_parser.rl"
|
378
380
|
{ snake_upcase_char((char *)p); }
|
379
381
|
goto st17;
|
380
382
|
tr23:
|
381
|
-
#line
|
383
|
+
#line 39 "ext/puma_http11/http11_parser.rl"
|
382
384
|
{ snake_upcase_char((char *)p); }
|
383
385
|
goto st17;
|
384
386
|
st17:
|
385
387
|
if ( ++p == pe )
|
386
388
|
goto _test_eof17;
|
387
389
|
case 17:
|
388
|
-
#line
|
390
|
+
#line 389 "ext/puma_http11/http11_parser.c"
|
389
391
|
switch( (*p) ) {
|
390
392
|
case 33: goto tr23;
|
391
393
|
case 58: goto tr24;
|
@@ -411,72 +413,85 @@ case 17:
|
|
411
413
|
goto tr23;
|
412
414
|
goto st0;
|
413
415
|
tr24:
|
414
|
-
#line
|
415
|
-
{
|
416
|
+
#line 40 "ext/puma_http11/http11_parser.rl"
|
417
|
+
{
|
416
418
|
parser->field_len = LEN(field_start, p);
|
417
419
|
}
|
418
420
|
goto st18;
|
419
421
|
tr27:
|
420
|
-
#line
|
422
|
+
#line 44 "ext/puma_http11/http11_parser.rl"
|
421
423
|
{ MARK(mark, p); }
|
422
424
|
goto st18;
|
423
425
|
st18:
|
424
426
|
if ( ++p == pe )
|
425
427
|
goto _test_eof18;
|
426
428
|
case 18:
|
427
|
-
#line
|
429
|
+
#line 428 "ext/puma_http11/http11_parser.c"
|
428
430
|
switch( (*p) ) {
|
429
431
|
case 13: goto tr26;
|
430
432
|
case 32: goto tr27;
|
433
|
+
case 127: goto st0;
|
431
434
|
}
|
435
|
+
if ( (*p) > 8 ) {
|
436
|
+
if ( 10 <= (*p) && (*p) <= 31 )
|
437
|
+
goto st0;
|
438
|
+
} else if ( (*p) >= 0 )
|
439
|
+
goto st0;
|
432
440
|
goto tr25;
|
433
441
|
tr25:
|
434
|
-
#line
|
442
|
+
#line 44 "ext/puma_http11/http11_parser.rl"
|
435
443
|
{ MARK(mark, p); }
|
436
444
|
goto st19;
|
437
445
|
st19:
|
438
446
|
if ( ++p == pe )
|
439
447
|
goto _test_eof19;
|
440
448
|
case 19:
|
441
|
-
#line
|
442
|
-
|
443
|
-
goto tr29;
|
449
|
+
#line 448 "ext/puma_http11/http11_parser.c"
|
450
|
+
switch( (*p) ) {
|
451
|
+
case 13: goto tr29;
|
452
|
+
case 127: goto st0;
|
453
|
+
}
|
454
|
+
if ( (*p) > 8 ) {
|
455
|
+
if ( 10 <= (*p) && (*p) <= 31 )
|
456
|
+
goto st0;
|
457
|
+
} else if ( (*p) >= 0 )
|
458
|
+
goto st0;
|
444
459
|
goto st19;
|
445
460
|
tr9:
|
446
|
-
#line
|
447
|
-
{
|
461
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
462
|
+
{
|
448
463
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
449
464
|
}
|
450
465
|
goto st20;
|
451
466
|
tr38:
|
452
|
-
#line
|
467
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
453
468
|
{
|
454
469
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
455
470
|
}
|
456
|
-
#line
|
457
|
-
{
|
471
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
472
|
+
{
|
458
473
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
459
474
|
}
|
460
475
|
goto st20;
|
461
|
-
|
462
|
-
#line 57 "ext/puma_http11/http11_parser.rl"
|
463
|
-
{ MARK(query_start, p); }
|
476
|
+
tr42:
|
464
477
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
465
|
-
{
|
478
|
+
{ MARK(query_start, p); }
|
479
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
480
|
+
{
|
466
481
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
467
482
|
}
|
468
|
-
#line
|
469
|
-
{
|
483
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
484
|
+
{
|
470
485
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
471
486
|
}
|
472
487
|
goto st20;
|
473
|
-
|
474
|
-
#line
|
475
|
-
{
|
488
|
+
tr45:
|
489
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
490
|
+
{
|
476
491
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
477
492
|
}
|
478
|
-
#line
|
479
|
-
{
|
493
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
494
|
+
{
|
480
495
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
481
496
|
}
|
482
497
|
goto st20;
|
@@ -484,7 +499,7 @@ st20:
|
|
484
499
|
if ( ++p == pe )
|
485
500
|
goto _test_eof20;
|
486
501
|
case 20:
|
487
|
-
#line
|
502
|
+
#line 501 "ext/puma_http11/http11_parser.c"
|
488
503
|
switch( (*p) ) {
|
489
504
|
case 32: goto tr31;
|
490
505
|
case 60: goto st0;
|
@@ -498,14 +513,14 @@ case 20:
|
|
498
513
|
goto st0;
|
499
514
|
goto tr30;
|
500
515
|
tr30:
|
501
|
-
#line
|
516
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
502
517
|
{ MARK(mark, p); }
|
503
518
|
goto st21;
|
504
519
|
st21:
|
505
520
|
if ( ++p == pe )
|
506
521
|
goto _test_eof21;
|
507
522
|
case 21:
|
508
|
-
#line
|
523
|
+
#line 522 "ext/puma_http11/http11_parser.c"
|
509
524
|
switch( (*p) ) {
|
510
525
|
case 32: goto tr33;
|
511
526
|
case 60: goto st0;
|
@@ -519,14 +534,14 @@ case 21:
|
|
519
534
|
goto st0;
|
520
535
|
goto st21;
|
521
536
|
tr5:
|
522
|
-
#line
|
537
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
523
538
|
{ MARK(mark, p); }
|
524
539
|
goto st22;
|
525
540
|
st22:
|
526
541
|
if ( ++p == pe )
|
527
542
|
goto _test_eof22;
|
528
543
|
case 22:
|
529
|
-
#line
|
544
|
+
#line 543 "ext/puma_http11/http11_parser.c"
|
530
545
|
switch( (*p) ) {
|
531
546
|
case 43: goto st22;
|
532
547
|
case 58: goto st23;
|
@@ -544,14 +559,14 @@ case 22:
|
|
544
559
|
goto st22;
|
545
560
|
goto st0;
|
546
561
|
tr7:
|
547
|
-
#line
|
562
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
548
563
|
{ MARK(mark, p); }
|
549
564
|
goto st23;
|
550
565
|
st23:
|
551
566
|
if ( ++p == pe )
|
552
567
|
goto _test_eof23;
|
553
568
|
case 23:
|
554
|
-
#line
|
569
|
+
#line 568 "ext/puma_http11/http11_parser.c"
|
555
570
|
switch( (*p) ) {
|
556
571
|
case 32: goto tr8;
|
557
572
|
case 34: goto st0;
|
@@ -564,29 +579,28 @@ case 23:
|
|
564
579
|
goto st0;
|
565
580
|
goto st23;
|
566
581
|
tr6:
|
567
|
-
#line
|
582
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
568
583
|
{ MARK(mark, p); }
|
569
584
|
goto st24;
|
570
585
|
st24:
|
571
586
|
if ( ++p == pe )
|
572
587
|
goto _test_eof24;
|
573
588
|
case 24:
|
574
|
-
#line
|
589
|
+
#line 588 "ext/puma_http11/http11_parser.c"
|
575
590
|
switch( (*p) ) {
|
576
591
|
case 32: goto tr37;
|
577
592
|
case 34: goto st0;
|
578
593
|
case 35: goto tr38;
|
579
|
-
case 59: goto tr39;
|
580
594
|
case 60: goto st0;
|
581
595
|
case 62: goto st0;
|
582
|
-
case 63: goto
|
596
|
+
case 63: goto tr39;
|
583
597
|
case 127: goto st0;
|
584
598
|
}
|
585
599
|
if ( 0 <= (*p) && (*p) <= 31 )
|
586
600
|
goto st0;
|
587
601
|
goto st24;
|
588
602
|
tr39:
|
589
|
-
#line
|
603
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
590
604
|
{
|
591
605
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
592
606
|
}
|
@@ -595,30 +609,27 @@ st25:
|
|
595
609
|
if ( ++p == pe )
|
596
610
|
goto _test_eof25;
|
597
611
|
case 25:
|
598
|
-
#line
|
612
|
+
#line 611 "ext/puma_http11/http11_parser.c"
|
599
613
|
switch( (*p) ) {
|
600
|
-
case 32: goto
|
614
|
+
case 32: goto tr41;
|
601
615
|
case 34: goto st0;
|
602
|
-
case 35: goto
|
616
|
+
case 35: goto tr42;
|
603
617
|
case 60: goto st0;
|
604
618
|
case 62: goto st0;
|
605
|
-
case 63: goto st26;
|
606
619
|
case 127: goto st0;
|
607
620
|
}
|
608
621
|
if ( 0 <= (*p) && (*p) <= 31 )
|
609
622
|
goto st0;
|
610
|
-
goto
|
623
|
+
goto tr40;
|
611
624
|
tr40:
|
612
|
-
#line
|
613
|
-
{
|
614
|
-
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
615
|
-
}
|
625
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
626
|
+
{ MARK(query_start, p); }
|
616
627
|
goto st26;
|
617
628
|
st26:
|
618
629
|
if ( ++p == pe )
|
619
630
|
goto _test_eof26;
|
620
631
|
case 26:
|
621
|
-
#line
|
632
|
+
#line 631 "ext/puma_http11/http11_parser.c"
|
622
633
|
switch( (*p) ) {
|
623
634
|
case 32: goto tr44;
|
624
635
|
case 34: goto st0;
|
@@ -629,27 +640,25 @@ case 26:
|
|
629
640
|
}
|
630
641
|
if ( 0 <= (*p) && (*p) <= 31 )
|
631
642
|
goto st0;
|
632
|
-
goto
|
633
|
-
tr43:
|
634
|
-
#line 57 "ext/puma_http11/http11_parser.rl"
|
635
|
-
{ MARK(query_start, p); }
|
636
|
-
goto st27;
|
643
|
+
goto st26;
|
637
644
|
st27:
|
638
645
|
if ( ++p == pe )
|
639
646
|
goto _test_eof27;
|
640
647
|
case 27:
|
641
|
-
#line 641 "ext/puma_http11/http11_parser.c"
|
642
648
|
switch( (*p) ) {
|
643
|
-
case 32: goto
|
644
|
-
case
|
645
|
-
case
|
646
|
-
case 60: goto st0;
|
647
|
-
case 62: goto st0;
|
648
|
-
case 127: goto st0;
|
649
|
+
case 32: goto tr2;
|
650
|
+
case 36: goto st28;
|
651
|
+
case 95: goto st28;
|
649
652
|
}
|
650
|
-
if (
|
651
|
-
|
652
|
-
|
653
|
+
if ( (*p) < 48 ) {
|
654
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
655
|
+
goto st28;
|
656
|
+
} else if ( (*p) > 57 ) {
|
657
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
658
|
+
goto st28;
|
659
|
+
} else
|
660
|
+
goto st28;
|
661
|
+
goto st0;
|
653
662
|
st28:
|
654
663
|
if ( ++p == pe )
|
655
664
|
goto _test_eof28;
|
@@ -960,24 +969,6 @@ st45:
|
|
960
969
|
if ( ++p == pe )
|
961
970
|
goto _test_eof45;
|
962
971
|
case 45:
|
963
|
-
switch( (*p) ) {
|
964
|
-
case 32: goto tr2;
|
965
|
-
case 36: goto st46;
|
966
|
-
case 95: goto st46;
|
967
|
-
}
|
968
|
-
if ( (*p) < 48 ) {
|
969
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
970
|
-
goto st46;
|
971
|
-
} else if ( (*p) > 57 ) {
|
972
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
973
|
-
goto st46;
|
974
|
-
} else
|
975
|
-
goto st46;
|
976
|
-
goto st0;
|
977
|
-
st46:
|
978
|
-
if ( ++p == pe )
|
979
|
-
goto _test_eof46;
|
980
|
-
case 46:
|
981
972
|
if ( (*p) == 32 )
|
982
973
|
goto tr2;
|
983
974
|
goto st0;
|
@@ -997,7 +988,7 @@ case 46:
|
|
997
988
|
_test_eof14: cs = 14; goto _test_eof;
|
998
989
|
_test_eof15: cs = 15; goto _test_eof;
|
999
990
|
_test_eof16: cs = 16; goto _test_eof;
|
1000
|
-
|
991
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1001
992
|
_test_eof17: cs = 17; goto _test_eof;
|
1002
993
|
_test_eof18: cs = 18; goto _test_eof;
|
1003
994
|
_test_eof19: cs = 19; goto _test_eof;
|
@@ -1027,13 +1018,12 @@ case 46:
|
|
1027
1018
|
_test_eof43: cs = 43; goto _test_eof;
|
1028
1019
|
_test_eof44: cs = 44; goto _test_eof;
|
1029
1020
|
_test_eof45: cs = 45; goto _test_eof;
|
1030
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1031
1021
|
|
1032
1022
|
_test_eof: {}
|
1033
1023
|
_out: {}
|
1034
1024
|
}
|
1035
1025
|
|
1036
|
-
#line
|
1026
|
+
#line 115 "ext/puma_http11/http11_parser.rl"
|
1037
1027
|
|
1038
1028
|
if (!puma_parser_has_error(parser))
|
1039
1029
|
parser->cs = cs;
|
File without changes
|