puma 4.1.0 → 4.2.1
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 +44 -9
- data/README.md +7 -16
- data/docs/plugins.md +20 -10
- data/ext/puma_http11/http11_parser.c +37 -62
- data/ext/puma_http11/http11_parser_common.rl +3 -3
- data/lib/puma.rb +6 -0
- data/lib/puma/accept_nonblock.rb +5 -1
- data/lib/puma/app/status.rb +29 -28
- data/lib/puma/binder.rb +36 -12
- data/lib/puma/cli.rb +4 -0
- data/lib/puma/client.rb +194 -206
- data/lib/puma/cluster.rb +41 -45
- data/lib/puma/const.rb +15 -18
- data/lib/puma/control_cli.rb +11 -2
- data/lib/puma/dsl.rb +17 -1
- data/lib/puma/events.rb +2 -2
- data/lib/puma/launcher.rb +87 -46
- data/lib/puma/plugin.rb +5 -2
- data/lib/puma/reactor.rb +5 -4
- data/lib/puma/runner.rb +3 -3
- data/lib/puma/server.rb +14 -11
- data/lib/puma/thread_pool.rb +9 -31
- data/lib/rack/handler/puma.rb +0 -2
- data/tools/docker/Dockerfile +16 -0
- data/tools/trickletest.rb +0 -1
- metadata +4 -4
- data/lib/puma/daemon_ext.rb +0 -33
- data/lib/puma/delegation.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9951b68e8fbc1851402ee152ae08df16681868b48cb8dd1ab94c409b12125b2
|
4
|
+
data.tar.gz: 250163367ab0f96dc67feb73e1105c48d20d69d5ad77095ce741d5ac63927e79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58c353b21da37a71ca1cca25f75ebc70bba0c1db97a3384d0169fb8258f5952a0ce80260330492fd7767d9ab423a834afd399d3ef1035cbbc248b0d767af8f06
|
7
|
+
data.tar.gz: 8143eeaccf5b22c0d99e2eb3c2852278833a927d31c6f7e7ed333866f3ce9753b67fe6b3dfd447078cae1269606075c2977a8d389b4169cc3738feacdf28c5db
|
data/History.md
CHANGED
@@ -1,14 +1,42 @@
|
|
1
|
-
## Master
|
2
|
-
|
3
1
|
* Features
|
4
2
|
* Your feature goes here (#Github Number)
|
5
3
|
|
6
4
|
* Bugfixes
|
7
5
|
* Your bugfix goes here (#Github Number)
|
8
6
|
|
7
|
+
## 4.2.1 / 2019-10-07
|
8
|
+
|
9
|
+
* 3 bugfixes
|
10
|
+
* Fix socket activation of systemd (pre-existing) unix binder files (#1842, #1988)
|
11
|
+
* Deal with multiple calls to bind correctly (#1986, #1994, #2006)
|
12
|
+
* Accepts symbols for `verify_mode` (#1222)
|
13
|
+
|
14
|
+
## 4.2.0 / 2019-09-23
|
15
|
+
|
16
|
+
* 6 features
|
17
|
+
* Pumactl has a new -e environment option and reads config/puma/<environment>.rb config files (#1885)
|
18
|
+
* Semicolons are now allowed in URL paths (MRI only), useful for Angular or Redmine (#1934)
|
19
|
+
* Allow extra dependencies to be defined when using prune_bundler (#1105)
|
20
|
+
* Puma now reports the correct port when binding to port 0, also reports other listeners when binding to localhost (#1786)
|
21
|
+
* Sending SIGINFO to any Puma worker now prints currently active threads and their backtraces (#1320)
|
22
|
+
* Puma threads all now have their name set on Ruby 2.3+ (#1968)
|
23
|
+
* 4 bugfixes
|
24
|
+
* Fix some misbehavior with phased restart and externally SIGTERMed workers (#1908, #1952)
|
25
|
+
* Fix socket closing on error (#1941)
|
26
|
+
* Removed unnecessary SIGINT trap for JRuby that caused some race conditions (#1961)
|
27
|
+
* Fix socket files being left around after process stopped (#1970)
|
28
|
+
* Absolutely thousands of lines of test improvements and fixes thanks to @MSP-Greg
|
29
|
+
|
30
|
+
## 4.1.1 / 2019-09-05
|
31
|
+
|
32
|
+
* 3 bugfixes
|
33
|
+
* Revert our attempt to not dup STDOUT/STDERR (#1946)
|
34
|
+
* Fix socket close on error (#1941)
|
35
|
+
* Fix workers not shutting down correctly (#1908)
|
36
|
+
|
9
37
|
## 4.1.0 / 2019-08-08
|
10
38
|
|
11
|
-
* 4 features
|
39
|
+
* 4 features
|
12
40
|
* Add REQUEST_PATH on parse error message (#1831)
|
13
41
|
* You can now easily add custom log formatters with the `log_formatter` config option (#1816)
|
14
42
|
* Puma.stats now provides process start times (#1844)
|
@@ -22,17 +50,17 @@
|
|
22
50
|
* SSL read_nonblock no longer blocks (#1857)
|
23
51
|
* Swallow connection errors when sending early hints (#1822)
|
24
52
|
* Backtrace no longer dumped when invalid pumactl commands are run (#1863)
|
25
|
-
|
26
|
-
* 5 other
|
53
|
+
|
54
|
+
* 5 other
|
27
55
|
* Avoid casting worker_timeout twice (#1838)
|
28
56
|
* Removed a call to private that wasn't doing anything (#1882)
|
29
57
|
* README, Rakefile, docs and test cleanups (#1848, #1847, #1846, #1853, #1859, #1850, #1866, #1870, #1872, #1833, #1888)
|
30
58
|
* Puma.io has proper documentation now (https://puma.io/puma/)
|
31
59
|
* Added the Contributor Covenant CoC
|
32
|
-
|
33
|
-
* 1 known issue
|
60
|
+
|
61
|
+
* 1 known issue
|
34
62
|
* Some users are still experiencing issues surrounding socket activation and Unix sockets (#1842)
|
35
|
-
|
63
|
+
|
36
64
|
## 4.0.1 / 2019-07-11
|
37
65
|
|
38
66
|
* 2 bugfixes
|
@@ -54,7 +82,7 @@
|
|
54
82
|
* Reactor now uses nio4r instead of `select` (#1728)
|
55
83
|
* Add status to pumactl with pidfile (#1824)
|
56
84
|
|
57
|
-
*
|
85
|
+
* 10 bugfixes
|
58
86
|
* Do not accept new requests on shutdown (#1685, #1808)
|
59
87
|
* Fix 3 corner cases when request body is chunked (#1508)
|
60
88
|
* Change pid existence check's condition branches (#1650)
|
@@ -64,6 +92,13 @@
|
|
64
92
|
* Fix Java 8 support (#1773)
|
65
93
|
* Fix error `uninitialized constant Puma::Cluster` (#1731)
|
66
94
|
* Fix `not_token` being able to be set to true (#1803)
|
95
|
+
* Fix "Hang on SIGTERM with ruby 2.6 in clustered mode" ([PR #1741], [#1674], [#1720], [#1730], [#1755])
|
96
|
+
|
97
|
+
[PR #1741]: https://github.com/puma/puma/pull/1741
|
98
|
+
[#1674]: https://github.com/puma/puma/issues/1674
|
99
|
+
[#1720]: https://github.com/puma/puma/issues/1720
|
100
|
+
[#1730]: https://github.com/puma/puma/issues/1730
|
101
|
+
[#1755]: https://github.com/puma/puma/issues/1755
|
67
102
|
|
68
103
|
## 3.12.1 / 2019-03-19
|
69
104
|
|
data/README.md
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
# Puma: A Ruby Web Server Built For Concurrency
|
6
6
|
|
7
7
|
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/puma/puma?utm\_source=badge&utm\_medium=badge&utm\_campaign=pr-badge)
|
8
|
-
[![Travis Build Status](https://
|
9
|
-
|
8
|
+
[![Travis Build Status](https://travis-ci.org/puma/puma.svg?branch=master)](https://travis-ci.org/puma/puma)
|
9
|
+
|
10
10
|
[![Code Climate](https://codeclimate.com/github/puma/puma.svg)](https://codeclimate.com/github/puma/puma)
|
11
11
|
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=puma&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=puma&package-manager=bundler&version-scheme=semver)
|
12
12
|
|
@@ -16,7 +16,7 @@ Puma is a **simple, fast, multi-threaded, and highly concurrent HTTP 1.1 server
|
|
16
16
|
|
17
17
|
Puma processes requests using a C-optimized Ragel extension (inherited from Mongrel) that provides fast, accurate HTTP 1.1 protocol parsing in a portable way. Puma then serves the request using a thread pool. Each request is served in a separate thread, so truly concurrent Ruby implementations (JRuby, Rubinius) will use all available CPU cores.
|
18
18
|
|
19
|
-
Puma was designed to be the go-to server for [Rubinius](https://
|
19
|
+
Puma was designed to be the go-to server for [Rubinius](https://rubinius.com), but also works well with JRuby and MRI.
|
20
20
|
|
21
21
|
On MRI, there is a Global VM Lock (GVL) that ensures only one thread can run Ruby code at a time. But if you're doing a lot of blocking IO (such as HTTP calls to external APIs like Twitter), Puma still improves MRI's throughput by allowing IO waiting to be done in parallel.
|
22
22
|
|
@@ -118,17 +118,6 @@ This code can be used to setup the process before booting the application, allow
|
|
118
118
|
you to do some Puma-specific things that you don't want to embed in your application.
|
119
119
|
For instance, you could fire a log notification that a worker booted or send something to statsd. This can be called multiple times.
|
120
120
|
|
121
|
-
If you're preloading your application and using ActiveRecord, it's recommended that you setup your connection pool here:
|
122
|
-
|
123
|
-
```ruby
|
124
|
-
# config/puma.rb
|
125
|
-
on_worker_boot do
|
126
|
-
ActiveSupport.on_load(:active_record) do
|
127
|
-
ActiveRecord::Base.establish_connection
|
128
|
-
end
|
129
|
-
end
|
130
|
-
```
|
131
|
-
|
132
121
|
`before_fork` specifies a block to be run before workers are forked:
|
133
122
|
|
134
123
|
```ruby
|
@@ -297,10 +286,10 @@ $ bundle install
|
|
297
286
|
$ bundle exec rake
|
298
287
|
```
|
299
288
|
|
300
|
-
To run a single test file,
|
289
|
+
To run a single test file, run only that file:
|
301
290
|
|
302
291
|
```bash
|
303
|
-
$
|
292
|
+
$ ruby -Ilib test/test_integration.rb
|
304
293
|
```
|
305
294
|
|
306
295
|
Or use [`m`](https://github.com/qrush/m):
|
@@ -315,6 +304,8 @@ Which can also be used to run a single test case:
|
|
315
304
|
$ bundle exec m test/test_binder.rb:37
|
316
305
|
```
|
317
306
|
|
307
|
+
If you open a pull request with a change that doesn't need to be noted in the changelog ([`History.md`](History.md)), add the text `[changelog skip]` to the pull request title to skip [the changelog check](https://github.com/puma/puma/pull/1991).
|
308
|
+
|
318
309
|
## License
|
319
310
|
|
320
311
|
Puma is copyright Evan Phoenix and contributors, licensed under the BSD 3-Clause license. See the included LICENSE file for details.
|
data/docs/plugins.md
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
## Plugins
|
2
2
|
|
3
|
-
Puma 3.0 added support for plugins that can augment configuration and service
|
3
|
+
Puma 3.0 added support for plugins that can augment configuration and service
|
4
|
+
operations.
|
4
5
|
|
5
6
|
2 canonical plugins to look to aid in development of further plugins:
|
6
7
|
|
7
|
-
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
8
|
-
|
8
|
+
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
9
|
+
Restarts the server if the file `tmp/restart.txt` is touched
|
10
|
+
* [heroku](https://github.com/puma/puma-heroku/blob/master/lib/puma/plugin/heroku.rb):
|
11
|
+
Packages up the default configuration used by puma on Heroku
|
9
12
|
|
10
|
-
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
13
|
+
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
14
|
+
by adding `plugin "name"`, such as `plugin "heroku"`.
|
11
15
|
|
12
|
-
Plugins are activated based simply on path requirements so, activating the
|
16
|
+
Plugins are activated based simply on path requirements so, activating the
|
17
|
+
`heroku` plugin will simply be doing `require "puma/plugin/heroku"`. This
|
18
|
+
allows gems to provide multiple plugins (as well as unrelated gems to provide
|
19
|
+
puma plugins).
|
13
20
|
|
14
21
|
The `tmp_restart` plugin is bundled with puma, so it can always be used.
|
15
22
|
|
@@ -17,12 +24,15 @@ To use the `heroku` plugin, add `puma-heroku` to your Gemfile or install it.
|
|
17
24
|
|
18
25
|
### API
|
19
26
|
|
20
|
-
|
27
|
+
## Server-wide hooks
|
21
28
|
|
22
|
-
|
29
|
+
Plugins can use a couple of hooks at server level: `start` and `config`.
|
23
30
|
|
24
|
-
`
|
31
|
+
`start` runs when the server has started and allows the plugin to start other
|
32
|
+
functionality to augment puma.
|
25
33
|
|
26
|
-
|
34
|
+
`config` runs when the server is being configured and is passed a `Puma::DSL`
|
35
|
+
object that can be used to add additional configuration.
|
27
36
|
|
28
|
-
|
37
|
+
Any public methods in `Puma::Plugin` are the public API that any plugin may
|
38
|
+
use.
|
@@ -38,7 +38,7 @@ static void snake_upcase_char(char *c)
|
|
38
38
|
|
39
39
|
#line 40 "ext/puma_http11/http11_parser.c"
|
40
40
|
static const int puma_parser_start = 1;
|
41
|
-
static const int puma_parser_first_final =
|
41
|
+
static const int puma_parser_first_final = 46;
|
42
42
|
static const int puma_parser_error = 0;
|
43
43
|
|
44
44
|
static const int puma_parser_en_main = 1;
|
@@ -117,17 +117,17 @@ case 2:
|
|
117
117
|
#line 118 "ext/puma_http11/http11_parser.c"
|
118
118
|
switch( (*p) ) {
|
119
119
|
case 32: goto tr2;
|
120
|
-
case 36: goto
|
121
|
-
case 95: goto
|
120
|
+
case 36: goto st27;
|
121
|
+
case 95: goto st27;
|
122
122
|
}
|
123
123
|
if ( (*p) < 48 ) {
|
124
124
|
if ( 45 <= (*p) && (*p) <= 46 )
|
125
|
-
goto
|
125
|
+
goto st27;
|
126
126
|
} else if ( (*p) > 57 ) {
|
127
127
|
if ( 65 <= (*p) && (*p) <= 90 )
|
128
|
-
goto
|
128
|
+
goto st27;
|
129
129
|
} else
|
130
|
-
goto
|
130
|
+
goto st27;
|
131
131
|
goto st0;
|
132
132
|
tr2:
|
133
133
|
#line 48 "ext/puma_http11/http11_parser.rl"
|
@@ -199,7 +199,7 @@ tr37:
|
|
199
199
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
200
200
|
}
|
201
201
|
goto st5;
|
202
|
-
|
202
|
+
tr41:
|
203
203
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
204
204
|
{ MARK(query_start, p); }
|
205
205
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -211,7 +211,7 @@ tr44:
|
|
211
211
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
212
212
|
}
|
213
213
|
goto st5;
|
214
|
-
|
214
|
+
tr44:
|
215
215
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
216
216
|
{
|
217
217
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -362,13 +362,13 @@ tr22:
|
|
362
362
|
{
|
363
363
|
parser->body_start = p - buffer + 1;
|
364
364
|
parser->header_done(parser, p + 1, pe - p - 1);
|
365
|
-
{p++; cs =
|
365
|
+
{p++; cs = 46; goto _out;}
|
366
366
|
}
|
367
|
-
goto
|
368
|
-
|
367
|
+
goto st46;
|
368
|
+
st46:
|
369
369
|
if ( ++p == pe )
|
370
|
-
goto
|
371
|
-
case
|
370
|
+
goto _test_eof46;
|
371
|
+
case 46:
|
372
372
|
#line 373 "ext/puma_http11/http11_parser.c"
|
373
373
|
goto st0;
|
374
374
|
tr21:
|
@@ -458,7 +458,7 @@ tr38:
|
|
458
458
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
459
459
|
}
|
460
460
|
goto st20;
|
461
|
-
|
461
|
+
tr42:
|
462
462
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
463
463
|
{ MARK(query_start, p); }
|
464
464
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -470,7 +470,7 @@ tr45:
|
|
470
470
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
471
471
|
}
|
472
472
|
goto st20;
|
473
|
-
|
473
|
+
tr45:
|
474
474
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
475
475
|
{
|
476
476
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -576,10 +576,9 @@ case 24:
|
|
576
576
|
case 32: goto tr37;
|
577
577
|
case 34: goto st0;
|
578
578
|
case 35: goto tr38;
|
579
|
-
case 59: goto tr39;
|
580
579
|
case 60: goto st0;
|
581
580
|
case 62: goto st0;
|
582
|
-
case 63: goto
|
581
|
+
case 63: goto tr39;
|
583
582
|
case 127: goto st0;
|
584
583
|
}
|
585
584
|
if ( 0 <= (*p) && (*p) <= 31 )
|
@@ -595,30 +594,27 @@ st25:
|
|
595
594
|
if ( ++p == pe )
|
596
595
|
goto _test_eof25;
|
597
596
|
case 25:
|
598
|
-
#line
|
597
|
+
#line 598 "ext/puma_http11/http11_parser.c"
|
599
598
|
switch( (*p) ) {
|
600
|
-
case 32: goto
|
599
|
+
case 32: goto tr41;
|
601
600
|
case 34: goto st0;
|
602
|
-
case 35: goto
|
601
|
+
case 35: goto tr42;
|
603
602
|
case 60: goto st0;
|
604
603
|
case 62: goto st0;
|
605
|
-
case 63: goto st26;
|
606
604
|
case 127: goto st0;
|
607
605
|
}
|
608
606
|
if ( 0 <= (*p) && (*p) <= 31 )
|
609
607
|
goto st0;
|
610
|
-
goto
|
608
|
+
goto tr40;
|
611
609
|
tr40:
|
612
|
-
#line
|
613
|
-
{
|
614
|
-
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
615
|
-
}
|
610
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
611
|
+
{ MARK(query_start, p); }
|
616
612
|
goto st26;
|
617
613
|
st26:
|
618
614
|
if ( ++p == pe )
|
619
615
|
goto _test_eof26;
|
620
616
|
case 26:
|
621
|
-
#line
|
617
|
+
#line 618 "ext/puma_http11/http11_parser.c"
|
622
618
|
switch( (*p) ) {
|
623
619
|
case 32: goto tr44;
|
624
620
|
case 34: goto st0;
|
@@ -629,27 +625,25 @@ case 26:
|
|
629
625
|
}
|
630
626
|
if ( 0 <= (*p) && (*p) <= 31 )
|
631
627
|
goto st0;
|
632
|
-
goto
|
633
|
-
tr43:
|
634
|
-
#line 58 "ext/puma_http11/http11_parser.rl"
|
635
|
-
{ MARK(query_start, p); }
|
636
|
-
goto st27;
|
628
|
+
goto st26;
|
637
629
|
st27:
|
638
630
|
if ( ++p == pe )
|
639
631
|
goto _test_eof27;
|
640
632
|
case 27:
|
641
|
-
#line 642 "ext/puma_http11/http11_parser.c"
|
642
633
|
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;
|
634
|
+
case 32: goto tr2;
|
635
|
+
case 36: goto st28;
|
636
|
+
case 95: goto st28;
|
649
637
|
}
|
650
|
-
if (
|
651
|
-
|
652
|
-
|
638
|
+
if ( (*p) < 48 ) {
|
639
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
640
|
+
goto st28;
|
641
|
+
} else if ( (*p) > 57 ) {
|
642
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
643
|
+
goto st28;
|
644
|
+
} else
|
645
|
+
goto st28;
|
646
|
+
goto st0;
|
653
647
|
st28:
|
654
648
|
if ( ++p == pe )
|
655
649
|
goto _test_eof28;
|
@@ -960,24 +954,6 @@ st45:
|
|
960
954
|
if ( ++p == pe )
|
961
955
|
goto _test_eof45;
|
962
956
|
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
957
|
if ( (*p) == 32 )
|
982
958
|
goto tr2;
|
983
959
|
goto st0;
|
@@ -997,7 +973,7 @@ case 46:
|
|
997
973
|
_test_eof14: cs = 14; goto _test_eof;
|
998
974
|
_test_eof15: cs = 15; goto _test_eof;
|
999
975
|
_test_eof16: cs = 16; goto _test_eof;
|
1000
|
-
|
976
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1001
977
|
_test_eof17: cs = 17; goto _test_eof;
|
1002
978
|
_test_eof18: cs = 18; goto _test_eof;
|
1003
979
|
_test_eof19: cs = 19; goto _test_eof;
|
@@ -1027,7 +1003,6 @@ case 46:
|
|
1027
1003
|
_test_eof43: cs = 43; goto _test_eof;
|
1028
1004
|
_test_eof44: cs = 44; goto _test_eof;
|
1029
1005
|
_test_eof45: cs = 45; goto _test_eof;
|
1030
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1031
1006
|
|
1032
1007
|
_test_eof: {}
|
1033
1008
|
_out: {}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
%%{
|
2
|
-
|
2
|
+
|
3
3
|
machine puma_parser_common;
|
4
4
|
|
5
5
|
#### HTTP PROTOCOL GRAMMAR
|
@@ -16,7 +16,7 @@
|
|
16
16
|
unreserved = (alpha | digit | safe | extra | national);
|
17
17
|
escape = ("%" xdigit xdigit);
|
18
18
|
uchar = (unreserved | escape | "%");
|
19
|
-
pchar = (uchar | ":" | "@" | "&" | "=" | "+");
|
19
|
+
pchar = (uchar | ":" | "@" | "&" | "=" | "+" | ";");
|
20
20
|
tspecials = ("(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\\" | "\"" | "/" | "[" | "]" | "?" | "=" | "{" | "}" | " " | "\t");
|
21
21
|
|
22
22
|
# elements
|
@@ -30,7 +30,7 @@
|
|
30
30
|
query = ( uchar | reserved )* %query_string ;
|
31
31
|
param = ( pchar | "/" )* ;
|
32
32
|
params = ( param ( ";" param )* ) ;
|
33
|
-
rel_path = ( path? %request_path
|
33
|
+
rel_path = ( path? %request_path ) ("?" %start_query query)?;
|
34
34
|
absolute_path = ( "/"+ rel_path );
|
35
35
|
|
36
36
|
Request_URI = ( "*" | absolute_uri | absolute_path ) >mark %request_uri;
|