puma 5.0.2-java → 5.2.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +667 -567
- data/README.md +51 -21
- data/bin/puma-wild +3 -9
- data/docs/compile_options.md +19 -0
- data/docs/deployment.md +6 -7
- data/docs/fork_worker.md +2 -0
- data/docs/jungle/README.md +0 -4
- data/docs/jungle/rc.d/puma +2 -2
- data/docs/kubernetes.md +66 -0
- data/docs/nginx.md +1 -1
- data/docs/plugins.md +1 -1
- data/docs/restart.md +46 -23
- data/docs/stats.md +142 -0
- data/docs/systemd.md +25 -3
- data/ext/puma_http11/ext_help.h +1 -1
- data/ext/puma_http11/extconf.rb +18 -5
- data/ext/puma_http11/http11_parser.c +45 -47
- 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 +199 -119
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +5 -7
- data/ext/puma_http11/puma_http11.c +25 -12
- data/lib/puma.rb +2 -2
- data/lib/puma/app/status.rb +44 -46
- data/lib/puma/binder.rb +69 -25
- data/lib/puma/cli.rb +4 -0
- data/lib/puma/client.rb +26 -79
- data/lib/puma/cluster.rb +37 -202
- data/lib/puma/cluster/worker.rb +176 -0
- data/lib/puma/cluster/worker_handle.rb +86 -0
- data/lib/puma/configuration.rb +21 -8
- data/lib/puma/const.rb +11 -3
- data/lib/puma/control_cli.rb +73 -70
- data/lib/puma/dsl.rb +100 -22
- data/lib/puma/error_logger.rb +10 -3
- data/lib/puma/events.rb +18 -3
- data/lib/puma/json.rb +96 -0
- data/lib/puma/launcher.rb +57 -15
- data/lib/puma/minissl.rb +47 -16
- data/lib/puma/minissl/context_builder.rb +6 -0
- data/lib/puma/null_io.rb +4 -0
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/queue_close.rb +26 -0
- data/lib/puma/reactor.rb +85 -363
- data/lib/puma/request.rb +451 -0
- data/lib/puma/runner.rb +17 -23
- data/lib/puma/server.rb +164 -553
- data/lib/puma/single.rb +2 -2
- data/lib/puma/state_file.rb +5 -3
- data/lib/puma/systemd.rb +46 -0
- data/lib/puma/util.rb +11 -0
- metadata +11 -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/docs/stats.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
## accessing stats
|
|
2
|
+
|
|
3
|
+
Stats can be accessed in two ways:
|
|
4
|
+
|
|
5
|
+
### control server
|
|
6
|
+
|
|
7
|
+
`$ pumactl stats` or `GET /stats`
|
|
8
|
+
|
|
9
|
+
[Read more about `pumactl` and the control server in the README.](https://github.com/puma/puma#controlstatus-server).
|
|
10
|
+
|
|
11
|
+
### Puma.stats
|
|
12
|
+
|
|
13
|
+
`Puma.stats` produces a JSON string. `Puma.stats_hash` produces a ruby hash.
|
|
14
|
+
|
|
15
|
+
#### in single mode
|
|
16
|
+
|
|
17
|
+
Invoke `Puma.stats` anywhere in runtime, e.g. in a rails initializer:
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
# config/initializers/puma_stats.rb
|
|
21
|
+
|
|
22
|
+
Thread.new do
|
|
23
|
+
loop do
|
|
24
|
+
sleep 30
|
|
25
|
+
puts Puma.stats
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### in cluster mode
|
|
31
|
+
|
|
32
|
+
Invoke `Puma.stats` from the master process
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
# config/puma.rb
|
|
36
|
+
|
|
37
|
+
before_fork do
|
|
38
|
+
Thread.new do
|
|
39
|
+
loop do
|
|
40
|
+
puts Puma.stats
|
|
41
|
+
sleep 30
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Explanation of stats
|
|
49
|
+
|
|
50
|
+
`Puma.stats` returns different information and a different structure depending on if Puma is in single vs cluster mode. There is one top-level attribute that is common to both modes:
|
|
51
|
+
|
|
52
|
+
* started_at: when puma was started
|
|
53
|
+
|
|
54
|
+
### single mode and individual workers in cluster mode
|
|
55
|
+
|
|
56
|
+
When Puma is run in single mode, these stats ar available at the top level. When Puma is run in cluster mode, these stats are available within the `worker_status` array in a hash labeled `last_status`, in an array of hashes, one hash for each worker.
|
|
57
|
+
|
|
58
|
+
* backlog: requests that are waiting for an available thread to be available. if this is above 0, you need more capacity [always true?]
|
|
59
|
+
* running: how many threads are running
|
|
60
|
+
* pool_capacity: the number of requests that the server is capable of taking right now. For example if the number is 5 then it means there are 5 threads sitting idle ready to take a request. If one request comes in, then the value would be 4 until it finishes processing. If the minimum threads allowed is zero, this number will still have a maximum value of the maximum threads allowed.
|
|
61
|
+
* max_threads: the maximum number of threads puma is configured to spool up per worker
|
|
62
|
+
* requests_count: the number of requests this worker has served since starting
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### cluster mode
|
|
66
|
+
|
|
67
|
+
* phase: which phase of restart the process is in, during [phased restart](https://github.com/puma/puma/blob/master/docs/restart.md)
|
|
68
|
+
* workers: ??
|
|
69
|
+
* booted_workers: how many workers currently running?
|
|
70
|
+
* old_workers: ??
|
|
71
|
+
* worker_status: array of hashes of info for each worker (see below)
|
|
72
|
+
|
|
73
|
+
### worker status
|
|
74
|
+
|
|
75
|
+
* started_at: when the worker was started
|
|
76
|
+
* pid: the process id of the worker process
|
|
77
|
+
* index: each worker gets a number. if puma is configured to have 3 workers, then this will be 0, 1, or 2
|
|
78
|
+
* booted: if it's done booting [?]
|
|
79
|
+
* last_checkin: Last time the worker responded to the master process' heartbeat check.
|
|
80
|
+
* last_status: a hash of info about the worker's state handling requests. See the explanation for this in "single mode and individual workers in cluster mode" section above.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
|
|
85
|
+
Here are two example stats hashes produced by `Puma.stats`:
|
|
86
|
+
|
|
87
|
+
### single
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"started_at": "2021-01-14T07:12:35Z",
|
|
92
|
+
"backlog": 0,
|
|
93
|
+
"running": 5,
|
|
94
|
+
"pool_capacity": 5,
|
|
95
|
+
"max_threads": 5,
|
|
96
|
+
"requests_count": 3
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### cluster
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"started_at": "2021-01-14T07:09:17Z",
|
|
105
|
+
"workers": 2,
|
|
106
|
+
"phase": 0,
|
|
107
|
+
"booted_workers": 2,
|
|
108
|
+
"old_workers": 0,
|
|
109
|
+
"worker_status": [
|
|
110
|
+
{
|
|
111
|
+
"started_at": "2021-01-14T07:09:24Z",
|
|
112
|
+
"pid": 64136,
|
|
113
|
+
"index": 0,
|
|
114
|
+
"phase": 0,
|
|
115
|
+
"booted": true,
|
|
116
|
+
"last_checkin": "2021-01-14T07:11:09Z",
|
|
117
|
+
"last_status": {
|
|
118
|
+
"backlog": 0,
|
|
119
|
+
"running": 5,
|
|
120
|
+
"pool_capacity": 5,
|
|
121
|
+
"max_threads": 5,
|
|
122
|
+
"requests_count": 2
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"started_at": "2021-01-14T07:09:24Z",
|
|
127
|
+
"pid": 64137,
|
|
128
|
+
"index": 1,
|
|
129
|
+
"phase": 0,
|
|
130
|
+
"booted": true,
|
|
131
|
+
"last_checkin": "2021-01-14T07:11:09Z",
|
|
132
|
+
"last_status": {
|
|
133
|
+
"backlog": 0,
|
|
134
|
+
"running": 5,
|
|
135
|
+
"pool_capacity": 5,
|
|
136
|
+
"max_threads": 5,
|
|
137
|
+
"requests_count": 1
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
```
|
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,25 @@ 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
|
-
|
|
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
|
|
30
|
+
|
|
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'
|
|
26
39
|
end
|
|
27
40
|
end
|
|
28
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;
|