puma 4.3.6 → 5.3.2
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 +1346 -518
- data/LICENSE +23 -20
- data/README.md +74 -31
- data/bin/puma-wild +3 -9
- data/docs/architecture.md +24 -20
- data/docs/compile_options.md +19 -0
- data/docs/deployment.md +15 -10
- data/docs/fork_worker.md +33 -0
- data/docs/jungle/README.md +9 -0
- data/{tools → docs}/jungle/rc.d/README.md +1 -1
- data/{tools → docs}/jungle/rc.d/puma +2 -2
- data/{tools → docs}/jungle/rc.d/puma.conf +0 -0
- data/docs/kubernetes.md +66 -0
- data/docs/nginx.md +1 -1
- data/docs/plugins.md +2 -2
- data/docs/rails_dev_mode.md +29 -0
- data/docs/restart.md +46 -23
- data/docs/signals.md +7 -6
- data/docs/stats.md +142 -0
- data/docs/systemd.md +27 -67
- data/ext/puma_http11/PumaHttp11Service.java +2 -4
- data/ext/puma_http11/ext_help.h +1 -1
- data/ext/puma_http11/extconf.rb +22 -8
- data/ext/puma_http11/http11_parser.c +45 -47
- data/ext/puma_http11/http11_parser.h +1 -1
- data/ext/puma_http11/http11_parser.java.rl +1 -1
- data/ext/puma_http11/http11_parser.rl +1 -1
- data/ext/puma_http11/mini_ssl.c +211 -118
- data/ext/puma_http11/no_ssl/PumaHttp11Service.java +15 -0
- data/ext/puma_http11/org/jruby/puma/Http11.java +3 -3
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +5 -7
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +77 -18
- data/ext/puma_http11/puma_http11.c +31 -50
- data/lib/puma.rb +46 -0
- data/lib/puma/app/status.rb +47 -36
- data/lib/puma/binder.rb +177 -103
- data/lib/puma/cli.rb +11 -15
- data/lib/puma/client.rb +73 -74
- data/lib/puma/cluster.rb +184 -198
- data/lib/puma/cluster/worker.rb +183 -0
- data/lib/puma/cluster/worker_handle.rb +90 -0
- data/lib/puma/commonlogger.rb +2 -2
- data/lib/puma/configuration.rb +55 -49
- data/lib/puma/const.rb +13 -5
- data/lib/puma/control_cli.rb +93 -76
- data/lib/puma/detect.rb +24 -3
- data/lib/puma/dsl.rb +266 -92
- data/lib/puma/error_logger.rb +104 -0
- data/lib/puma/events.rb +55 -34
- data/lib/puma/io_buffer.rb +9 -2
- data/lib/puma/jruby_restart.rb +0 -58
- data/lib/puma/json.rb +96 -0
- data/lib/puma/launcher.rb +113 -45
- data/lib/puma/minissl.rb +114 -33
- data/lib/puma/minissl/context_builder.rb +6 -3
- data/lib/puma/null_io.rb +13 -1
- data/lib/puma/plugin.rb +1 -10
- data/lib/puma/queue_close.rb +26 -0
- data/lib/puma/rack/builder.rb +0 -4
- data/lib/puma/reactor.rb +85 -369
- data/lib/puma/request.rb +467 -0
- data/lib/puma/runner.rb +29 -58
- data/lib/puma/server.rb +267 -729
- data/lib/puma/single.rb +9 -65
- data/lib/puma/state_file.rb +8 -3
- data/lib/puma/systemd.rb +46 -0
- data/lib/puma/thread_pool.rb +119 -53
- data/lib/puma/util.rb +12 -0
- data/lib/rack/handler/puma.rb +2 -3
- data/tools/{docker/Dockerfile → Dockerfile} +0 -0
- metadata +25 -21
- data/docs/tcp_mode.md +0 -96
- data/ext/puma_http11/io_buffer.c +0 -155
- data/ext/puma_http11/org/jruby/puma/IOBuffer.java +0 -72
- data/lib/puma/accept_nonblock.rb +0 -29
- data/lib/puma/tcp_logger.rb +0 -41
- data/tools/jungle/README.md +0 -19
- data/tools/jungle/init.d/README.md +0 -61
- data/tools/jungle/init.d/puma +0 -421
- data/tools/jungle/init.d/run-puma +0 -18
- data/tools/jungle/upstart/README.md +0 -61
- data/tools/jungle/upstart/puma-manager.conf +0 -31
- data/tools/jungle/upstart/puma.conf +0 -69
data/docs/systemd.md
CHANGED
@@ -8,14 +8,12 @@ useful features for running Puma in production.
|
|
8
8
|
## Service Configuration
|
9
9
|
|
10
10
|
Below is a sample puma.service configuration file for systemd, which
|
11
|
-
can be copied or symlinked to
|
11
|
+
can be copied or symlinked to `/etc/systemd/system/puma.service`, or if
|
12
12
|
desired, using an application or instance specific name.
|
13
13
|
|
14
14
|
Note that this uses the systemd preferred "simple" type where the
|
15
15
|
start command remains running in the foreground (does not fork and
|
16
|
-
exit).
|
17
|
-
[Alternative Forking Configuration](#alternative-forking-configuration)
|
18
|
-
below.
|
16
|
+
exit).
|
19
17
|
|
20
18
|
~~~~ ini
|
21
19
|
[Unit]
|
@@ -26,8 +24,15 @@ After=network.target
|
|
26
24
|
# Requires=puma.socket
|
27
25
|
|
28
26
|
[Service]
|
29
|
-
#
|
30
|
-
|
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
|
31
36
|
|
32
37
|
# Preferably configure a non-privileged user
|
33
38
|
# User=
|
@@ -78,7 +83,7 @@ pass the `--keep-file-descriptors` flag. `bundle exec` can be avoided by using a
|
|
78
83
|
`puma` executable generated by `bundle binstubs puma`. This is tracked in
|
79
84
|
[#1499].
|
80
85
|
|
81
|
-
**Note:** Socket activation doesn't currently work on
|
86
|
+
**Note:** Socket activation doesn't currently work on JRuby. This is
|
82
87
|
tracked in [#1367].
|
83
88
|
|
84
89
|
To use socket activation, configure one or more `ListenStream` sockets
|
@@ -124,6 +129,21 @@ Puma will detect the release path socket as different than the one provided by
|
|
124
129
|
systemd and attempt to bind it again, resulting in the exception
|
125
130
|
`There is already a server bound to:`.
|
126
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
|
+
|
127
147
|
## Usage
|
128
148
|
|
129
149
|
Without socket activation, use `systemctl` as root (e.g. via `sudo`) as
|
@@ -209,66 +229,6 @@ Apr 07 08:40:19 hx puma[28320]: * Activated ssl://0.0.0.0:9234?key=key.pem&cert=
|
|
209
229
|
Apr 07 08:40:19 hx puma[28320]: Use Ctrl-C to stop
|
210
230
|
~~~~
|
211
231
|
|
212
|
-
## Alternative Forking Configuration
|
213
|
-
|
214
|
-
Other systems/tools might expect or need puma to be run as a
|
215
|
-
"traditional" forking server, for example so that the `pumactl`
|
216
|
-
command can be used directly and outside of systemd for
|
217
|
-
stop/start/restart. This use case is incompatible with systemd socket
|
218
|
-
activation, so it should not be configured. Below is an alternative
|
219
|
-
puma.service config sample, using `Type=forking` and the `--daemon`
|
220
|
-
flag in `ExecStart`. Here systemd is playing a role more equivalent to
|
221
|
-
SysV init.d, where it is responsible for starting Puma on boot
|
222
|
-
(multi-user.target) and stopping it on shutdown, but is not performing
|
223
|
-
continuous restarts. Therefore running Puma in cluster mode, where the
|
224
|
-
master can restart workers, is highly recommended. See the systemd
|
225
|
-
[Restart] directive for details.
|
226
|
-
|
227
|
-
~~~~ ini
|
228
|
-
[Unit]
|
229
|
-
Description=Puma HTTP Forking Server
|
230
|
-
After=network.target
|
231
|
-
|
232
|
-
[Service]
|
233
|
-
# Background process configuration (use with --daemon in ExecStart)
|
234
|
-
Type=forking
|
235
|
-
|
236
|
-
# Preferably configure a non-privileged user
|
237
|
-
# User=
|
238
|
-
|
239
|
-
# The path to the puma application root
|
240
|
-
# Also replace the "<WD>" place holders below with this path.
|
241
|
-
WorkingDirectory=
|
242
|
-
|
243
|
-
# The command to start Puma
|
244
|
-
# (replace "<WD>" below)
|
245
|
-
ExecStart=bundle exec puma -C <WD>/shared/puma.rb --daemon
|
246
|
-
|
247
|
-
# The command to stop Puma
|
248
|
-
# (replace "<WD>" below)
|
249
|
-
ExecStop=bundle exec pumactl -S <WD>/shared/tmp/pids/puma.state stop
|
250
|
-
|
251
|
-
# Path to PID file so that systemd knows which is the master process
|
252
|
-
PIDFile=<WD>/shared/tmp/pids/puma.pid
|
253
|
-
|
254
|
-
# Should systemd restart puma?
|
255
|
-
# Use "no" (the default) to ensure no interference when using
|
256
|
-
# stop/start/restart via `pumactl`. The "on-failure" setting might
|
257
|
-
# work better for this purpose, but you must test it.
|
258
|
-
# Use "always" if only `systemctl` is used for start/stop/restart, and
|
259
|
-
# reconsider if you actually need the forking config.
|
260
|
-
Restart=no
|
261
|
-
|
262
|
-
# `puma_ctl restart` wouldn't work without this. It's because `pumactl`
|
263
|
-
# changes PID on restart and systemd stops the service afterwards
|
264
|
-
# because of the PID change. This option prevents stopping after PID
|
265
|
-
# change.
|
266
|
-
RemainAfterExit=yes
|
267
|
-
|
268
|
-
[Install]
|
269
|
-
WantedBy=multi-user.target
|
270
|
-
~~~~
|
271
|
-
|
272
232
|
### capistrano3-puma
|
273
233
|
|
274
234
|
By default,
|
@@ -1,18 +1,16 @@
|
|
1
1
|
package puma;
|
2
2
|
|
3
3
|
import java.io.IOException;
|
4
|
-
|
4
|
+
|
5
5
|
import org.jruby.Ruby;
|
6
6
|
import org.jruby.runtime.load.BasicLibraryService;
|
7
7
|
|
8
8
|
import org.jruby.puma.Http11;
|
9
|
-
import org.jruby.puma.IOBuffer;
|
10
9
|
import org.jruby.puma.MiniSSL;
|
11
10
|
|
12
|
-
public class PumaHttp11Service implements BasicLibraryService {
|
11
|
+
public class PumaHttp11Service implements BasicLibraryService {
|
13
12
|
public boolean basicLoad(final Ruby runtime) throws IOException {
|
14
13
|
Http11.createHttp11(runtime);
|
15
|
-
IOBuffer.createIOBuffer(runtime);
|
16
14
|
MiniSSL.createMiniSSL(runtime);
|
17
15
|
return true;
|
18
16
|
}
|
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
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
|
3
3
|
dir_config("puma_http11")
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
|
5
|
+
if $mingw && RUBY_VERSION >= '2.4'
|
6
|
+
append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2'
|
7
|
+
append_ldflags '-fstack-protector-strong -l:libssp.a'
|
7
8
|
have_library 'ssp'
|
8
9
|
end
|
9
10
|
|
@@ -16,12 +17,25 @@ unless ENV["DISABLE_SSL"]
|
|
16
17
|
have_header "openssl/bio.h"
|
17
18
|
|
18
19
|
# below is yes for 1.0.2 & later
|
19
|
-
have_func "DTLS_method"
|
20
|
+
have_func "DTLS_method" , "openssl/ssl.h"
|
21
|
+
|
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"
|
25
|
+
|
26
|
+
have_func "X509_STORE_up_ref"
|
27
|
+
have_func("SSL_CTX_set_ecdh_auto(NULL, 0)", "openssl/ssl.h")
|
28
|
+
end
|
29
|
+
end
|
20
30
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
31
|
+
if ENV["MAKE_WARNINGS_INTO_ERRORS"]
|
32
|
+
# Make all warnings into errors
|
33
|
+
# Except `implicit-fallthrough` since most failures comes from ragel state machine generated code
|
34
|
+
if respond_to? :append_cflags
|
35
|
+
append_cflags config_string 'WERRORFLAG'
|
36
|
+
append_cflags '-Wno-implicit-fallthrough'
|
37
|
+
else
|
38
|
+
$CFLAGS += ' ' << (config_string 'WERRORFLAG') << ' -Wno-implicit-fallthrough'
|
25
39
|
end
|
26
40
|
end
|
27
41
|
|
@@ -33,20 +33,18 @@ 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;
|
45
45
|
|
46
|
-
static const int puma_parser_en_main = 1;
|
47
46
|
|
48
|
-
|
49
|
-
#line 83 "ext/puma_http11/http11_parser.rl"
|
47
|
+
#line 85 "ext/puma_http11/http11_parser.rl"
|
50
48
|
|
51
49
|
int puma_parser_init(puma_parser *parser) {
|
52
50
|
int cs = 0;
|
@@ -56,7 +54,7 @@ int puma_parser_init(puma_parser *parser) {
|
|
56
54
|
cs = puma_parser_start;
|
57
55
|
}
|
58
56
|
|
59
|
-
#line
|
57
|
+
#line 89 "ext/puma_http11/http11_parser.rl"
|
60
58
|
parser->cs = cs;
|
61
59
|
parser->body_start = 0;
|
62
60
|
parser->content_len = 0;
|
@@ -109,7 +107,7 @@ st0:
|
|
109
107
|
cs = 0;
|
110
108
|
goto _out;
|
111
109
|
tr0:
|
112
|
-
#line
|
110
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
113
111
|
{ MARK(mark, p); }
|
114
112
|
goto st2;
|
115
113
|
st2:
|
@@ -132,7 +130,7 @@ case 2:
|
|
132
130
|
goto st27;
|
133
131
|
goto st0;
|
134
132
|
tr2:
|
135
|
-
#line
|
133
|
+
#line 50 "ext/puma_http11/http11_parser.rl"
|
136
134
|
{
|
137
135
|
parser->request_method(parser, PTR_TO(mark), LEN(mark, p));
|
138
136
|
}
|
@@ -158,7 +156,7 @@ case 3:
|
|
158
156
|
goto tr5;
|
159
157
|
goto st0;
|
160
158
|
tr4:
|
161
|
-
#line
|
159
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
162
160
|
{ MARK(mark, p); }
|
163
161
|
goto st4;
|
164
162
|
st4:
|
@@ -172,53 +170,53 @@ case 4:
|
|
172
170
|
}
|
173
171
|
goto st0;
|
174
172
|
tr8:
|
175
|
-
#line
|
173
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
176
174
|
{
|
177
175
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
178
176
|
}
|
179
177
|
goto st5;
|
180
178
|
tr31:
|
181
|
-
#line
|
179
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
182
180
|
{ MARK(mark, p); }
|
183
|
-
#line
|
181
|
+
#line 56 "ext/puma_http11/http11_parser.rl"
|
184
182
|
{
|
185
183
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
186
184
|
}
|
187
185
|
goto st5;
|
188
186
|
tr33:
|
189
|
-
#line
|
187
|
+
#line 56 "ext/puma_http11/http11_parser.rl"
|
190
188
|
{
|
191
189
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
192
190
|
}
|
193
191
|
goto st5;
|
194
192
|
tr37:
|
195
|
-
#line
|
193
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
196
194
|
{
|
197
195
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
198
196
|
}
|
199
|
-
#line
|
197
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
200
198
|
{
|
201
199
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
202
200
|
}
|
203
201
|
goto st5;
|
204
202
|
tr41:
|
205
|
-
#line
|
203
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
206
204
|
{ MARK(query_start, p); }
|
207
|
-
#line
|
205
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
208
206
|
{
|
209
207
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
210
208
|
}
|
211
|
-
#line
|
209
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
212
210
|
{
|
213
211
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
214
212
|
}
|
215
213
|
goto st5;
|
216
214
|
tr44:
|
217
|
-
#line
|
215
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
218
216
|
{
|
219
217
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
220
218
|
}
|
221
|
-
#line
|
219
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
222
220
|
{
|
223
221
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
224
222
|
}
|
@@ -232,7 +230,7 @@ case 5:
|
|
232
230
|
goto tr10;
|
233
231
|
goto st0;
|
234
232
|
tr10:
|
235
|
-
#line
|
233
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
236
234
|
{ MARK(mark, p); }
|
237
235
|
goto st6;
|
238
236
|
st6:
|
@@ -297,21 +295,21 @@ case 13:
|
|
297
295
|
goto st13;
|
298
296
|
goto st0;
|
299
297
|
tr18:
|
300
|
-
#line
|
298
|
+
#line 65 "ext/puma_http11/http11_parser.rl"
|
301
299
|
{
|
302
300
|
parser->http_version(parser, PTR_TO(mark), LEN(mark, p));
|
303
301
|
}
|
304
302
|
goto st14;
|
305
303
|
tr26:
|
306
|
-
#line
|
304
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
307
305
|
{ MARK(mark, p); }
|
308
|
-
#line
|
306
|
+
#line 47 "ext/puma_http11/http11_parser.rl"
|
309
307
|
{
|
310
308
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
311
309
|
}
|
312
310
|
goto st14;
|
313
311
|
tr29:
|
314
|
-
#line
|
312
|
+
#line 47 "ext/puma_http11/http11_parser.rl"
|
315
313
|
{
|
316
314
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
317
315
|
}
|
@@ -360,7 +358,7 @@ case 16:
|
|
360
358
|
goto tr22;
|
361
359
|
goto st0;
|
362
360
|
tr22:
|
363
|
-
#line
|
361
|
+
#line 73 "ext/puma_http11/http11_parser.rl"
|
364
362
|
{
|
365
363
|
parser->body_start = p - buffer + 1;
|
366
364
|
parser->header_done(parser, p + 1, pe - p - 1);
|
@@ -374,13 +372,13 @@ case 46:
|
|
374
372
|
#line 373 "ext/puma_http11/http11_parser.c"
|
375
373
|
goto st0;
|
376
374
|
tr21:
|
377
|
-
#line
|
375
|
+
#line 40 "ext/puma_http11/http11_parser.rl"
|
378
376
|
{ MARK(field_start, p); }
|
379
|
-
#line
|
377
|
+
#line 41 "ext/puma_http11/http11_parser.rl"
|
380
378
|
{ snake_upcase_char((char *)p); }
|
381
379
|
goto st17;
|
382
380
|
tr23:
|
383
|
-
#line
|
381
|
+
#line 41 "ext/puma_http11/http11_parser.rl"
|
384
382
|
{ snake_upcase_char((char *)p); }
|
385
383
|
goto st17;
|
386
384
|
st17:
|
@@ -413,13 +411,13 @@ case 17:
|
|
413
411
|
goto tr23;
|
414
412
|
goto st0;
|
415
413
|
tr24:
|
416
|
-
#line
|
414
|
+
#line 42 "ext/puma_http11/http11_parser.rl"
|
417
415
|
{
|
418
416
|
parser->field_len = LEN(field_start, p);
|
419
417
|
}
|
420
418
|
goto st18;
|
421
419
|
tr27:
|
422
|
-
#line
|
420
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
423
421
|
{ MARK(mark, p); }
|
424
422
|
goto st18;
|
425
423
|
st18:
|
@@ -433,7 +431,7 @@ case 18:
|
|
433
431
|
}
|
434
432
|
goto tr25;
|
435
433
|
tr25:
|
436
|
-
#line
|
434
|
+
#line 46 "ext/puma_http11/http11_parser.rl"
|
437
435
|
{ MARK(mark, p); }
|
438
436
|
goto st19;
|
439
437
|
st19:
|
@@ -445,39 +443,39 @@ case 19:
|
|
445
443
|
goto tr29;
|
446
444
|
goto st19;
|
447
445
|
tr9:
|
448
|
-
#line
|
446
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
449
447
|
{
|
450
448
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
451
449
|
}
|
452
450
|
goto st20;
|
453
451
|
tr38:
|
454
|
-
#line
|
452
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
455
453
|
{
|
456
454
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
457
455
|
}
|
458
|
-
#line
|
456
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
459
457
|
{
|
460
458
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
461
459
|
}
|
462
460
|
goto st20;
|
463
461
|
tr42:
|
464
|
-
#line
|
462
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
465
463
|
{ MARK(query_start, p); }
|
466
|
-
#line
|
464
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
467
465
|
{
|
468
466
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
469
467
|
}
|
470
|
-
#line
|
468
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
471
469
|
{
|
472
470
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
473
471
|
}
|
474
472
|
goto st20;
|
475
473
|
tr45:
|
476
|
-
#line
|
474
|
+
#line 61 "ext/puma_http11/http11_parser.rl"
|
477
475
|
{
|
478
476
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
479
477
|
}
|
480
|
-
#line
|
478
|
+
#line 53 "ext/puma_http11/http11_parser.rl"
|
481
479
|
{
|
482
480
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
483
481
|
}
|
@@ -500,7 +498,7 @@ case 20:
|
|
500
498
|
goto st0;
|
501
499
|
goto tr30;
|
502
500
|
tr30:
|
503
|
-
#line
|
501
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
504
502
|
{ MARK(mark, p); }
|
505
503
|
goto st21;
|
506
504
|
st21:
|
@@ -521,7 +519,7 @@ case 21:
|
|
521
519
|
goto st0;
|
522
520
|
goto st21;
|
523
521
|
tr5:
|
524
|
-
#line
|
522
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
525
523
|
{ MARK(mark, p); }
|
526
524
|
goto st22;
|
527
525
|
st22:
|
@@ -546,7 +544,7 @@ case 22:
|
|
546
544
|
goto st22;
|
547
545
|
goto st0;
|
548
546
|
tr7:
|
549
|
-
#line
|
547
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
550
548
|
{ MARK(mark, p); }
|
551
549
|
goto st23;
|
552
550
|
st23:
|
@@ -566,7 +564,7 @@ case 23:
|
|
566
564
|
goto st0;
|
567
565
|
goto st23;
|
568
566
|
tr6:
|
569
|
-
#line
|
567
|
+
#line 37 "ext/puma_http11/http11_parser.rl"
|
570
568
|
{ MARK(mark, p); }
|
571
569
|
goto st24;
|
572
570
|
st24:
|
@@ -587,7 +585,7 @@ case 24:
|
|
587
585
|
goto st0;
|
588
586
|
goto st24;
|
589
587
|
tr39:
|
590
|
-
#line
|
588
|
+
#line 69 "ext/puma_http11/http11_parser.rl"
|
591
589
|
{
|
592
590
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
593
591
|
}
|
@@ -609,7 +607,7 @@ case 25:
|
|
609
607
|
goto st0;
|
610
608
|
goto tr40;
|
611
609
|
tr40:
|
612
|
-
#line
|
610
|
+
#line 60 "ext/puma_http11/http11_parser.rl"
|
613
611
|
{ MARK(query_start, p); }
|
614
612
|
goto st26;
|
615
613
|
st26:
|
@@ -1010,7 +1008,7 @@ case 45:
|
|
1010
1008
|
_out: {}
|
1011
1009
|
}
|
1012
1010
|
|
1013
|
-
#line
|
1011
|
+
#line 117 "ext/puma_http11/http11_parser.rl"
|
1014
1012
|
|
1015
1013
|
if (!puma_parser_has_error(parser))
|
1016
1014
|
parser->cs = cs;
|