puma 5.0.0-java → 5.1.0-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 +1190 -574
- data/README.md +28 -20
- data/bin/puma-wild +3 -9
- data/docs/compile_options.md +19 -0
- data/docs/deployment.md +5 -6
- data/docs/fork_worker.md +2 -0
- data/docs/jungle/README.md +0 -4
- data/docs/jungle/rc.d/puma +2 -2
- data/docs/nginx.md +1 -1
- data/docs/restart.md +46 -23
- data/docs/systemd.md +25 -3
- data/ext/puma_http11/ext_help.h +1 -1
- data/ext/puma_http11/extconf.rb +4 -5
- data/ext/puma_http11/http11_parser.c +64 -64
- data/ext/puma_http11/mini_ssl.c +39 -37
- data/ext/puma_http11/puma_http11.c +25 -12
- data/lib/puma.rb +7 -4
- data/lib/puma/app/status.rb +44 -46
- data/lib/puma/binder.rb +48 -1
- data/lib/puma/cli.rb +4 -0
- data/lib/puma/client.rb +31 -80
- data/lib/puma/cluster.rb +39 -202
- data/lib/puma/cluster/worker.rb +176 -0
- data/lib/puma/cluster/worker_handle.rb +86 -0
- data/lib/puma/configuration.rb +20 -8
- data/lib/puma/const.rb +11 -3
- data/lib/puma/control_cli.rb +71 -70
- data/lib/puma/dsl.rb +67 -19
- data/lib/puma/error_logger.rb +2 -2
- data/lib/puma/events.rb +21 -3
- data/lib/puma/json.rb +96 -0
- data/lib/puma/launcher.rb +61 -12
- data/lib/puma/minissl.rb +8 -0
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/queue_close.rb +26 -0
- data/lib/puma/reactor.rb +79 -373
- data/lib/puma/request.rb +451 -0
- data/lib/puma/runner.rb +15 -21
- data/lib/puma/server.rb +193 -508
- data/lib/puma/single.rb +3 -2
- data/lib/puma/state_file.rb +5 -3
- data/lib/puma/systemd.rb +46 -0
- data/lib/puma/thread_pool.rb +22 -2
- data/lib/puma/util.rb +12 -0
- metadata +9 -6
- data/docs/jungle/upstart/README.md +0 -61
- data/docs/jungle/upstart/puma-manager.conf +0 -31
- data/docs/jungle/upstart/puma.conf +0 -69
- data/lib/puma/accept_nonblock.rb +0 -29
data/README.md
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
# Puma: A Ruby Web Server Built For Concurrency
|
6
6
|
|
7
|
-
[![Actions
|
7
|
+
[![Actions MRI](https://github.com/puma/puma/workflows/MRI/badge.svg?branch=master)](https://github.com/puma/puma/actions?query=workflow%3AMRI)
|
8
|
+
[![Actions non MRI](https://github.com/puma/puma/workflows/non_MRI/badge.svg?branch=master)](https://github.com/puma/puma/actions?query=workflow%3Anon_MRI)
|
8
9
|
[![Code Climate](https://codeclimate.com/github/puma/puma.svg)](https://codeclimate.com/github/puma/puma)
|
9
10
|
[![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)
|
10
11
|
[![StackOverflow](https://img.shields.io/badge/stackoverflow-Puma-blue.svg)]( https://stackoverflow.com/questions/tagged/puma )
|
@@ -63,20 +64,30 @@ You can run your Sinatra application with Puma from the command line like this:
|
|
63
64
|
$ ruby app.rb -s Puma
|
64
65
|
```
|
65
66
|
|
66
|
-
|
67
|
+
In order to actually configure Puma using a config file, like `puma.rb`, however, you need to use the `puma` executable. To do this, you must add a rackup file to your Sinatra app:
|
67
68
|
|
68
69
|
```ruby
|
69
|
-
|
70
|
-
|
70
|
+
# config.ru
|
71
|
+
require './app'
|
72
|
+
run Sinatra::Application
|
73
|
+
```
|
74
|
+
|
75
|
+
You can then start your application using:
|
76
|
+
|
77
|
+
```
|
78
|
+
$ bundle exec puma
|
71
79
|
```
|
72
80
|
|
73
81
|
## Configuration
|
74
82
|
|
75
|
-
Puma provides numerous options. Consult `puma -h` (or `puma --help`) for a full list of CLI options, or see [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb).
|
83
|
+
Puma provides numerous options. Consult `puma -h` (or `puma --help`) for a full list of CLI options, or see `Puma::DSL` or [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb).
|
76
84
|
|
77
85
|
You can also find several configuration examples as part of the
|
78
86
|
[test](https://github.com/puma/puma/tree/master/test/config) suite.
|
79
87
|
|
88
|
+
For debugging purposes, you can set the environment variable `PUMA_LOG_CONFIG` with a value
|
89
|
+
and the loaded configuration will be printed as part of the boot process.
|
90
|
+
|
80
91
|
### Thread Pool
|
81
92
|
|
82
93
|
Puma uses a thread pool. You can set the minimum and maximum number of threads that are available in the pool with the `-t` (or `--threads`) flag:
|
@@ -135,12 +146,12 @@ before_fork do
|
|
135
146
|
end
|
136
147
|
```
|
137
148
|
|
138
|
-
Preloading can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and preload_app copies the code of master into the workers.
|
149
|
+
Preloading can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and `preload_app!` copies the code of master into the workers.
|
139
150
|
|
140
151
|
### Error handling
|
141
152
|
|
142
153
|
If puma encounters an error outside of the context of your application, it will respond with a 500 and a simple
|
143
|
-
textual error message (see `lowlevel_error`
|
154
|
+
textual error message (see `Puma::Server#lowlevel_error` or [server.rb](https://github.com/puma/puma/blob/master/lib/puma/server.rb)).
|
144
155
|
You can specify custom behavior for this scenario. For example, you can report the error to your third-party
|
145
156
|
error-tracking service (in this example, [rollbar](https://rollbar.com)):
|
146
157
|
|
@@ -193,7 +204,7 @@ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&ssl_cipher_fil
|
|
193
204
|
$ puma -b 'ssl://127.0.0.1:9292?keystore=path_to_keystore&keystore-pass=keystore_password&ssl_cipher_list=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA'
|
194
205
|
```
|
195
206
|
|
196
|
-
See https://www.openssl.org/docs/man1.
|
207
|
+
See https://www.openssl.org/docs/man1.1.1/man1/ciphers.html for cipher filter format and full list of cipher suites.
|
197
208
|
|
198
209
|
Disable TLS v1 with the `no_tlsv1` option:
|
199
210
|
|
@@ -209,7 +220,7 @@ Puma has a built-in status and control app that can be used to query and control
|
|
209
220
|
$ puma --control-url tcp://127.0.0.1:9293 --control-token foo
|
210
221
|
```
|
211
222
|
|
212
|
-
Puma will start the control server on localhost port 9293. All requests to the control server will need to include control token (in this case, `token=foo`) as a query parameter. This allows for simple authentication. Check out [status.rb](https://github.com/puma/puma/blob/master/lib/puma/app/status.rb) to see what the status app has available.
|
223
|
+
Puma will start the control server on localhost port 9293. All requests to the control server will need to include control token (in this case, `token=foo`) as a query parameter. This allows for simple authentication. Check out `Puma::App::Status` or [status.rb](https://github.com/puma/puma/blob/master/lib/puma/app/status.rb) to see what the status app has available.
|
213
224
|
|
214
225
|
You can also interact with the control server via `pumactl`. This command will restart Puma:
|
215
226
|
|
@@ -235,19 +246,19 @@ If you want to prevent Puma from looking for a configuration file in those locat
|
|
235
246
|
$ puma -C "-"
|
236
247
|
```
|
237
248
|
|
238
|
-
The other side-effects of setting the environment are whether to show stack traces (in `development` or `test`), and setting RACK_ENV may potentially affect middleware looking for this value to change their behavior. The default puma RACK_ENV value is `development`. You can see all config default values [
|
249
|
+
The other side-effects of setting the environment are whether to show stack traces (in `development` or `test`), and setting RACK_ENV may potentially affect middleware looking for this value to change their behavior. The default puma RACK_ENV value is `development`. You can see all config default values in `Puma::Configuration#puma_default_options` or [configuration.rb](https://github.com/puma/puma/blob/61c6213fbab/lib/puma/configuration.rb#L182-L204).
|
239
250
|
|
240
|
-
Check out [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb) to see all available options.
|
251
|
+
Check out `Puma::DSL` or [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb) to see all available options.
|
241
252
|
|
242
253
|
## Restart
|
243
254
|
|
244
255
|
Puma includes the ability to restart itself. When available (MRI, Rubinius, JRuby), Puma performs a "hot restart". This is the same functionality available in *Unicorn* and *NGINX* which keep the server sockets open between restarts. This makes sure that no pending requests are dropped while the restart is taking place.
|
245
256
|
|
246
|
-
For more, see the [
|
257
|
+
For more, see the [Restart documentation](docs/restart.md).
|
247
258
|
|
248
259
|
## Signals
|
249
260
|
|
250
|
-
Puma responds to several signals. A detailed guide to using UNIX signals with Puma can be found in the [
|
261
|
+
Puma responds to several signals. A detailed guide to using UNIX signals with Puma can be found in the [Signals documentation](docs/signals.md).
|
251
262
|
|
252
263
|
## Platform Constraints
|
253
264
|
|
@@ -273,18 +284,17 @@ end
|
|
273
284
|
|
274
285
|
Puma has support for Capistrano with an [external gem](https://github.com/seuros/capistrano-puma).
|
275
286
|
|
276
|
-
It is common to use process monitors with Puma. Modern process monitors like systemd or
|
287
|
+
It is common to use process monitors with Puma. Modern process monitors like systemd or rc.d
|
277
288
|
provide continuous monitoring and restarts for increased
|
278
289
|
reliability in production environments:
|
279
290
|
|
280
|
-
* [
|
281
|
-
* [
|
291
|
+
* [rc.d](docs/jungle/rc.d/README.md)
|
292
|
+
* [systemd](docs/systemd.md)
|
282
293
|
|
283
294
|
## Community Extensions
|
284
295
|
|
285
296
|
### Plugins
|
286
297
|
|
287
|
-
* [puma-heroku](https://github.com/puma/puma-heroku) — default Puma configuration for running on Heroku
|
288
298
|
* [puma-metrics](https://github.com/harmjanblok/puma-metrics) — export Puma metrics to Prometheus
|
289
299
|
* [puma-plugin-statsd](https://github.com/yob/puma-plugin-statsd) — send Puma metrics to statsd
|
290
300
|
* [puma-plugin-systemd](https://github.com/sj26/puma-plugin-systemd) — deeper integration with systemd for notify, status and watchdog
|
@@ -295,9 +305,7 @@ reliability in production environments:
|
|
295
305
|
|
296
306
|
## Contributing
|
297
307
|
|
298
|
-
Find details for contributing in the [contribution guide].
|
299
|
-
|
300
|
-
[contribution guide]: https://github.com/puma/puma/blob/master/CONTRIBUTING.md
|
308
|
+
Find details for contributing in the [contribution guide](CONTRIBUTING.md).
|
301
309
|
|
302
310
|
## License
|
303
311
|
|
data/bin/puma-wild
CHANGED
@@ -5,24 +5,18 @@
|
|
5
5
|
|
6
6
|
require 'rubygems'
|
7
7
|
|
8
|
-
|
8
|
+
cli_arg = ARGV.shift
|
9
9
|
|
10
10
|
inc = ""
|
11
11
|
|
12
|
-
if
|
12
|
+
if cli_arg == "-I"
|
13
13
|
inc = ARGV.shift
|
14
14
|
$LOAD_PATH.concat inc.split(":")
|
15
|
-
gems = ARGV.shift
|
16
|
-
end
|
17
|
-
|
18
|
-
gems.split(",").each do |s|
|
19
|
-
name, ver = s.split(":",2)
|
20
|
-
gem name, ver
|
21
15
|
end
|
22
16
|
|
23
17
|
module Puma; end
|
24
18
|
|
25
|
-
Puma.const_set("WILD_ARGS", ["-I", inc
|
19
|
+
Puma.const_set("WILD_ARGS", ["-I", inc])
|
26
20
|
|
27
21
|
require 'puma/cli'
|
28
22
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Compile Options
|
2
|
+
|
3
|
+
There provide some `cflags` to change Puma's default configuration for C.
|
4
|
+
|
5
|
+
## Query String
|
6
|
+
|
7
|
+
By default, the max length of `QUERY_STRING` is `1024 * 10`. But you may want to adjust it to allow accept large queries in the GET requests.
|
8
|
+
|
9
|
+
For manual install
|
10
|
+
|
11
|
+
```
|
12
|
+
gem install puma -- --with-cflags="-D PUMA_QUERY_STRING_MAX_LENGTH=64000"
|
13
|
+
```
|
14
|
+
|
15
|
+
For bundler config
|
16
|
+
|
17
|
+
```
|
18
|
+
bundle config build.puma --with-cflags="-D PUMA_QUERY_STRING_MAX_LENGTH=64000"
|
19
|
+
```
|
data/docs/deployment.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Deployment engineering for
|
1
|
+
# Deployment engineering for Puma
|
2
2
|
|
3
3
|
Puma is software that is expected to be run in a deployed environment eventually.
|
4
4
|
You can certainly use it as your dev server only, but most people look to use
|
@@ -7,12 +7,11 @@ it in their production deployments as well.
|
|
7
7
|
To that end, this is meant to serve as a foundation of wisdom how to do that
|
8
8
|
in a way that increases happiness and decreases downtime.
|
9
9
|
|
10
|
-
## Specifying
|
10
|
+
## Specifying Puma
|
11
11
|
|
12
12
|
Most people want to do this by putting `gem "puma"` into their Gemfile, so we'll
|
13
13
|
go ahead and assume that. Go add it now... we'll wait.
|
14
14
|
|
15
|
-
|
16
15
|
Welcome back!
|
17
16
|
|
18
17
|
## Single vs Cluster mode
|
@@ -20,7 +19,7 @@ Welcome back!
|
|
20
19
|
Puma was originally conceived as a thread-only webserver, but grew the ability to
|
21
20
|
also use processes in version 2.
|
22
21
|
|
23
|
-
To run puma in single mode (e.g. for a development environment) you will need to
|
22
|
+
To run `puma` in single mode (e.g. for a development environment) you will need to
|
24
23
|
set the number of workers to 0, anything above will run in cluster mode.
|
25
24
|
|
26
25
|
Here are some rules of thumb for cluster mode:
|
@@ -82,7 +81,7 @@ thread to become available.
|
|
82
81
|
|
83
82
|
Daemonization was removed in Puma 5.0. For alternatives, continue reading.
|
84
83
|
|
85
|
-
I prefer to not daemonize my servers and use something like `runit` or `
|
84
|
+
I prefer to not daemonize my servers and use something like `runit` or `systemd` to
|
86
85
|
monitor them as child processes. This gives them fast response to crashes and
|
87
86
|
makes it easy to figure out what is going on. Additionally, unlike `unicorn`,
|
88
87
|
puma does not require daemonization to do zero-downtime restarts.
|
@@ -92,7 +91,7 @@ task and thus want it to live on past the `cap deploy`. To these people I say:
|
|
92
91
|
You need to be using a process monitor. Nothing is making sure puma stays up in
|
93
92
|
this scenario! You're just waiting for something weird to happen, puma to die,
|
94
93
|
and to get paged at 3am. Do yourself a favor, at least the process monitoring
|
95
|
-
your OS comes with, be it `sysvinit
|
94
|
+
your OS comes with, be it `sysvinit` or `systemd`. Or branch out
|
96
95
|
and use `runit` or hell, even `monit`.
|
97
96
|
|
98
97
|
## Restarting
|
data/docs/fork_worker.md
CHANGED
@@ -24,6 +24,8 @@ Similar to the `preload_app!` option, the `fork_worker` option allows your appli
|
|
24
24
|
|
25
25
|
### Limitations
|
26
26
|
|
27
|
+
- Not compatible with the `preload_app!` option
|
28
|
+
|
27
29
|
- This mode is still very experimental so there may be bugs or edge-cases, particularly around expected behavior of existing hooks. Please open a [bug report](https://github.com/puma/puma/issues/new?template=bug_report.md) if you encounter any issues.
|
28
30
|
|
29
31
|
- In order to fork new workers cleanly, worker 0 shuts down its server and stops serving requests so there are no open file descriptors or other kinds of shared global state between processes, and to maximize copy-on-write efficiency across the newly-forked workers. This may temporarily reduce total capacity of the cluster during a phased restart / refork.
|
data/docs/jungle/README.md
CHANGED
data/docs/jungle/rc.d/puma
CHANGED
@@ -23,7 +23,7 @@ puma_start()
|
|
23
23
|
rb_ver=$(/usr/local/bin/jq -r ".servers[$i].ruby_version" /usr/local/etc/puma.conf)
|
24
24
|
case $rb_env in
|
25
25
|
"rbenv")
|
26
|
-
|
26
|
+
cd $dir && rbenv shell $rb_ver && /usr/sbin/daemon -u $user bundle exec puma -C $dir/config/puma.rb
|
27
27
|
;;
|
28
28
|
*)
|
29
29
|
;;
|
@@ -48,7 +48,7 @@ puma_restart()
|
|
48
48
|
rb_ver=$(/usr/local/bin/jq -r ".servers[$i].ruby_version" /usr/local/etc/puma.conf)
|
49
49
|
case $rb_env in
|
50
50
|
"rbenv")
|
51
|
-
|
51
|
+
cd $dir && rbenv shell $rb_ver && /usr/sbin/daemon -u $user bundle exec puma -C $dir/config/puma.rb
|
52
52
|
;;
|
53
53
|
*)
|
54
54
|
;;
|
data/docs/nginx.md
CHANGED
@@ -31,7 +31,7 @@ server {
|
|
31
31
|
|
32
32
|
location / {
|
33
33
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
34
|
-
proxy_set_header Host $
|
34
|
+
proxy_set_header Host $host;
|
35
35
|
|
36
36
|
# If the file exists as a static file serve it directly without
|
37
37
|
# running all the other rewrite tests on it
|
data/docs/restart.md
CHANGED
@@ -1,41 +1,64 @@
|
|
1
|
-
|
1
|
+
Puma provides three distinct kinds of restart operations, each for different use cases. Hot restarts and phased restarts are described here. The third kind of restart operation is called "refork" and is described in the documentation for [`fork_worker`](fork_worker.md).
|
2
2
|
|
3
|
-
|
3
|
+
## Hot restart
|
4
4
|
|
5
|
-
|
6
|
-
* Send the `puma` process the `SIGUSR1` signal (restart in phases (a "rolling restart"), cluster mode only)
|
7
|
-
* Use the status server and issue `/restart`
|
5
|
+
To perform a "hot" restart, Puma performs an `exec` operation to start the process up again, so no memory is shared between the old process and the new process. As a result, it is safe to issue a restart any place where you would manually stop Puma and start it again. In particular, it is safe to upgrade Puma itself using a hot restart.
|
8
6
|
|
9
|
-
|
7
|
+
If the new process is unable to load, it will simply exit. You should therefore run Puma under a process monitor when using it in production.
|
10
8
|
|
11
|
-
|
9
|
+
### How-to
|
12
10
|
|
13
|
-
|
11
|
+
Any of the following will cause a Puma server to perform a hot restart:
|
14
12
|
|
15
|
-
|
13
|
+
* Send the `puma` process the `SIGUSR2` signal
|
14
|
+
* Issue a `GET` request to the Puma status/control server with the path `/restart`
|
15
|
+
* Issue `pumactl restart` (this uses the control server method if available, otherwise sends the `SIGUSR2` signal to the process)
|
16
16
|
|
17
|
-
|
17
|
+
### Supported configurations
|
18
18
|
|
19
|
-
|
19
|
+
* Works in cluster mode and in single mode
|
20
|
+
* Supported on all platforms
|
20
21
|
|
21
|
-
|
22
|
+
### Client experience
|
22
23
|
|
23
|
-
|
24
|
+
* All platforms: for clients with an in-flight request, those clients will be served responses before the connection is closed gracefully. Puma gracefully disconnects any idle HTTP persistent connections before restarting.
|
25
|
+
* On MRI or TruffleRuby on Linux and BSD: Clients who connect just before the server restarts may experience increased latency while the server stops and starts again, but their connections will not be closed prematurely.
|
26
|
+
* On Windows and on JRuby: Clients who connect just before a restart may experience "connection reset" errors.
|
24
27
|
|
25
|
-
|
28
|
+
### Additional notes
|
26
29
|
|
27
|
-
|
30
|
+
* Only one version of the application is running at a time.
|
31
|
+
* `on_restart` is invoked just before the server shuts down. This can be used to clean up resources (like long-lived database connections) gracefully. Since Ruby 2.0, it is not typically necessary to explicitly close file descriptors on restart. This is because any file descriptor opened by Ruby will have the `FD_CLOEXEC` flag set, meaning that file descriptors are closed on `exec`. `on_restart` is useful, though, if your application needs to perform any more graceful protocol-specific shutdown procedures before closing connections.
|
28
32
|
|
29
|
-
|
33
|
+
## Phased restart
|
30
34
|
|
31
|
-
|
32
|
-
# config/puma.rb
|
35
|
+
Phased restarts replace all running workers in a Puma cluster. This is a useful way to gracefully upgrade the application that Puma is serving. A phased restart works by first killing an old worker, then starting a new worker, waiting until the new worker has successfully started before proceeding to the next worker. This process continues until all workers have been replaced. The master process is not restarted.
|
33
36
|
|
34
|
-
|
35
|
-
```
|
37
|
+
### How-to
|
36
38
|
|
37
|
-
|
39
|
+
Any of the following will cause a Puma server to perform a phased restart:
|
38
40
|
|
39
|
-
|
41
|
+
* Send the `puma` process the `SIGUSR1` signal
|
42
|
+
* Issue a `GET` request to the Puma status/control server with the path `/phased-restart`
|
43
|
+
* Issue `pumactl phased-restart` (this uses the control server method if available, otherwise sends the `SIGUSR1` signal to the process)
|
40
44
|
|
41
|
-
|
45
|
+
### Supported configurations
|
46
|
+
|
47
|
+
* Works in cluster mode only
|
48
|
+
* To support upgrading the application that Puma is serving, ensure `prune_bundler` is enabled and that `preload_app` is disabled (it is disabled by default).
|
49
|
+
* Supported on all platforms where cluster mode is supported
|
50
|
+
|
51
|
+
### Client experience
|
52
|
+
|
53
|
+
* In-flight requests are always served responses before the connection is closed gracefully
|
54
|
+
* Idle persistent connections are gracefully disconnected
|
55
|
+
* New connections are not lost, and clients will not experience any increase in latency (as long as the number of configured workers is greater than one)
|
56
|
+
|
57
|
+
### Additional notes
|
58
|
+
|
59
|
+
* When a phased restart begins, the Puma master process changes its current working directory to the directory specified by the `directory` option. If `directory` is set to symlink, this is automatically re-evaluated, so this mechanism can be used to upgrade the application.
|
60
|
+
* On a single server, it's possible that two versions of the application are running concurrently during a phased restart.
|
61
|
+
* `on_restart` is not invoked
|
62
|
+
* Phased restarts can be slow for Puma clusters with many workers. Hot restarts often complete more quickly, but at the cost of increased latency during the restart.
|
63
|
+
* Phased restarts cannot be used to upgrade any gems loaded by the Puma master process, including `puma` itself, anything in `extra_runtime_dependencies`, or dependencies thereof. Upgrading other gems is safe.
|
64
|
+
* If you remove the gems from old releases as part of your deployment strategy, there are additional considerations. Do not put any gems into `extra_runtime_dependencies` that have native extensions or have dependencies that have native extensions (one common example is `puma_worker_killer` and its dependency on `ffi`). Workers will fail on boot during a phased restart. The underlying issue is recorded in [an issue on the rubygems project](https://github.com/rubygems/rubygems/issues/4004). Hot restarts are your only option here if you need these dependencies.
|
data/docs/systemd.md
CHANGED
@@ -24,8 +24,15 @@ After=network.target
|
|
24
24
|
# Requires=puma.socket
|
25
25
|
|
26
26
|
[Service]
|
27
|
-
#
|
28
|
-
|
27
|
+
# Puma supports systemd's `Type=notify` and watchdog service
|
28
|
+
# monitoring, if the [sd_notify](https://github.com/agis/ruby-sdnotify) gem is installed,
|
29
|
+
# as of Puma 5.1 or later.
|
30
|
+
# On earlier versions of Puma or JRuby, change this to `Type=simple` and remove
|
31
|
+
# the `WatchdogSec` line.
|
32
|
+
Type=notify
|
33
|
+
|
34
|
+
# If your Puma process locks up, systemd's watchdog will restart it within seconds.
|
35
|
+
WatchdogSec=10
|
29
36
|
|
30
37
|
# Preferably configure a non-privileged user
|
31
38
|
# User=
|
@@ -76,7 +83,7 @@ pass the `--keep-file-descriptors` flag. `bundle exec` can be avoided by using a
|
|
76
83
|
`puma` executable generated by `bundle binstubs puma`. This is tracked in
|
77
84
|
[#1499].
|
78
85
|
|
79
|
-
**Note:** Socket activation doesn't currently work on
|
86
|
+
**Note:** Socket activation doesn't currently work on JRuby. This is
|
80
87
|
tracked in [#1367].
|
81
88
|
|
82
89
|
To use socket activation, configure one or more `ListenStream` sockets
|
@@ -122,6 +129,21 @@ Puma will detect the release path socket as different than the one provided by
|
|
122
129
|
systemd and attempt to bind it again, resulting in the exception
|
123
130
|
`There is already a server bound to:`.
|
124
131
|
|
132
|
+
### Binding
|
133
|
+
|
134
|
+
By default you need to configure puma to have binds matching with all
|
135
|
+
ListenStream statements. Any mismatched systemd ListenStreams will be closed by
|
136
|
+
puma.
|
137
|
+
|
138
|
+
To automatically bind to all activated sockets, the option
|
139
|
+
`--bind-to-activated-sockets` can be used. This matches the config DSL
|
140
|
+
`bind_to_activated_sockets` statement. This will cause puma to create a bind
|
141
|
+
automatically for any activated socket. When systemd socket activation is not
|
142
|
+
enabled, this option does nothing.
|
143
|
+
|
144
|
+
This also accepts an optional argument `only` (DSL: `'only'`) to discard any
|
145
|
+
binds that's not socket activated.
|
146
|
+
|
125
147
|
## Usage
|
126
148
|
|
127
149
|
Without socket activation, use `systemctl` as root (e.g. via `sudo`) as
|
data/ext/puma_http11/ext_help.h
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#define ext_help_h
|
3
3
|
|
4
4
|
#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "%s", "NULL found for " # T " when shouldn't be.");
|
5
|
-
#define DATA_GET(from,type,name)
|
5
|
+
#define DATA_GET(from,type,data_type,name) TypedData_Get_Struct(from,type,data_type,name); RAISE_NOT_NULL(name);
|
6
6
|
#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "%s", "Wrong argument type for " # V " required " # T);
|
7
7
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
8
8
|
|
data/ext/puma_http11/extconf.rb
CHANGED
@@ -17,12 +17,11 @@ unless ENV["DISABLE_SSL"]
|
|
17
17
|
have_header "openssl/bio.h"
|
18
18
|
|
19
19
|
# below is yes for 1.0.2 & later
|
20
|
-
have_func "DTLS_method"
|
20
|
+
have_func "DTLS_method" , "openssl/ssl.h"
|
21
21
|
|
22
|
-
# below are yes for 1.1.0 & later
|
23
|
-
|
24
|
-
have_func "
|
25
|
-
have_macro "SSL_CTX_set_min_proto_version", "openssl/ssl.h"
|
22
|
+
# below are yes for 1.1.0 & later
|
23
|
+
have_func "TLS_server_method" , "openssl/ssl.h"
|
24
|
+
have_func "SSL_CTX_set_min_proto_version(NULL, 0)", "openssl/ssl.h"
|
26
25
|
end
|
27
26
|
end
|
28
27
|
|
@@ -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;
|