puma 2.0.0.b5 → 5.0.0.beta1
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 +7 -0
- data/History.md +1598 -0
- data/LICENSE +23 -20
- data/README.md +222 -62
- data/bin/puma-wild +31 -0
- data/bin/pumactl +1 -1
- data/docs/architecture.md +37 -0
- data/docs/deployment.md +113 -0
- data/docs/fork_worker.md +31 -0
- data/docs/images/puma-connection-flow-no-reactor.png +0 -0
- data/docs/images/puma-connection-flow.png +0 -0
- data/docs/images/puma-general-arch.png +0 -0
- data/docs/jungle/README.md +13 -0
- data/docs/jungle/rc.d/README.md +74 -0
- data/docs/jungle/rc.d/puma +61 -0
- data/docs/jungle/rc.d/puma.conf +10 -0
- data/docs/jungle/upstart/README.md +61 -0
- data/docs/jungle/upstart/puma-manager.conf +31 -0
- data/docs/jungle/upstart/puma.conf +69 -0
- data/docs/nginx.md +5 -10
- data/docs/plugins.md +38 -0
- data/docs/restart.md +41 -0
- data/docs/signals.md +97 -0
- data/docs/systemd.md +228 -0
- data/ext/puma_http11/PumaHttp11Service.java +2 -2
- data/ext/puma_http11/extconf.rb +23 -2
- data/ext/puma_http11/http11_parser.c +301 -482
- data/ext/puma_http11/http11_parser.h +13 -11
- data/ext/puma_http11/http11_parser.java.rl +26 -42
- data/ext/puma_http11/http11_parser.rl +22 -21
- data/ext/puma_http11/http11_parser_common.rl +5 -5
- data/ext/puma_http11/mini_ssl.c +377 -18
- data/ext/puma_http11/org/jruby/puma/Http11.java +108 -107
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +137 -170
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +265 -191
- data/ext/puma_http11/puma_http11.c +57 -81
- data/lib/puma.rb +25 -4
- data/lib/puma/accept_nonblock.rb +7 -1
- data/lib/puma/app/status.rb +61 -24
- data/lib/puma/binder.rb +212 -78
- data/lib/puma/cli.rb +149 -644
- data/lib/puma/client.rb +316 -65
- data/lib/puma/cluster.rb +659 -0
- data/lib/puma/commonlogger.rb +108 -0
- data/lib/puma/configuration.rb +279 -180
- data/lib/puma/const.rb +126 -39
- data/lib/puma/control_cli.rb +183 -96
- data/lib/puma/detect.rb +20 -1
- data/lib/puma/dsl.rb +776 -0
- data/lib/puma/events.rb +91 -23
- data/lib/puma/io_buffer.rb +9 -5
- data/lib/puma/jruby_restart.rb +9 -5
- data/lib/puma/launcher.rb +487 -0
- data/lib/puma/minissl.rb +239 -93
- data/lib/puma/minissl/context_builder.rb +76 -0
- data/lib/puma/null_io.rb +22 -12
- data/lib/puma/plugin.rb +111 -0
- data/lib/puma/plugin/tmp_restart.rb +36 -0
- data/lib/puma/rack/builder.rb +297 -0
- data/lib/puma/rack/urlmap.rb +93 -0
- data/lib/puma/rack_default.rb +9 -0
- data/lib/puma/reactor.rb +290 -43
- data/lib/puma/runner.rb +163 -0
- data/lib/puma/server.rb +493 -126
- data/lib/puma/single.rb +66 -0
- data/lib/puma/state_file.rb +34 -0
- data/lib/puma/thread_pool.rb +228 -47
- data/lib/puma/util.rb +115 -0
- data/lib/rack/handler/puma.rb +78 -31
- data/tools/Dockerfile +16 -0
- data/tools/trickletest.rb +44 -0
- metadata +60 -155
- data/COPYING +0 -55
- data/Gemfile +0 -8
- data/History.txt +0 -196
- data/Manifest.txt +0 -56
- data/Rakefile +0 -121
- data/TODO +0 -5
- data/docs/config.md +0 -0
- data/ext/puma_http11/io_buffer.c +0 -154
- data/lib/puma/capistrano.rb +0 -26
- data/lib/puma/compat.rb +0 -11
- data/lib/puma/daemon_ext.rb +0 -20
- data/lib/puma/delegation.rb +0 -11
- data/lib/puma/java_io_buffer.rb +0 -45
- data/lib/puma/rack_patch.rb +0 -25
- data/puma.gemspec +0 -45
- data/test/test_app_status.rb +0 -88
- data/test/test_cli.rb +0 -171
- data/test/test_config.rb +0 -16
- data/test/test_http10.rb +0 -27
- data/test/test_http11.rb +0 -126
- data/test/test_integration.rb +0 -150
- data/test/test_iobuffer.rb +0 -38
- data/test/test_minissl.rb +0 -22
- data/test/test_null_io.rb +0 -31
- data/test/test_persistent.rb +0 -238
- data/test/test_puma_server.rb +0 -128
- data/test/test_rack_handler.rb +0 -10
- data/test/test_rack_server.rb +0 -141
- data/test/test_thread_pool.rb +0 -146
- data/test/test_unix_socket.rb +0 -39
- data/test/test_ws.rb +0 -89
- data/tools/jungle/README.md +0 -54
- data/tools/jungle/puma +0 -332
- data/tools/jungle/run-puma +0 -3
@@ -1,14 +1,14 @@
|
|
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
9
|
import org.jruby.puma.MiniSSL;
|
10
10
|
|
11
|
-
public class PumaHttp11Service implements BasicLibraryService {
|
11
|
+
public class PumaHttp11Service implements BasicLibraryService {
|
12
12
|
public boolean basicLoad(final Ruby runtime) throws IOException {
|
13
13
|
Http11.createHttp11(runtime);
|
14
14
|
MiniSSL.createMiniSSL(runtime);
|
data/ext/puma_http11/extconf.rb
CHANGED
@@ -2,7 +2,28 @@ require 'mkmf'
|
|
2
2
|
|
3
3
|
dir_config("puma_http11")
|
4
4
|
|
5
|
-
$
|
6
|
-
|
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'
|
8
|
+
have_library 'ssp'
|
9
|
+
end
|
10
|
+
|
11
|
+
unless ENV["DISABLE_SSL"]
|
12
|
+
dir_config("openssl")
|
13
|
+
|
14
|
+
if %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} and
|
15
|
+
%w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
|
16
|
+
|
17
|
+
have_header "openssl/bio.h"
|
18
|
+
|
19
|
+
# below is yes for 1.0.2 & later
|
20
|
+
have_func "DTLS_method" , "openssl/ssl.h"
|
21
|
+
|
22
|
+
# below are yes for 1.1.0 & later, may need to check func rather than macro
|
23
|
+
# with versions after 1.1.1
|
24
|
+
have_func "TLS_server_method" , "openssl/ssl.h"
|
25
|
+
have_macro "SSL_CTX_set_min_proto_version", "openssl/ssl.h"
|
26
|
+
end
|
27
|
+
end
|
7
28
|
|
8
29
|
create_makefile("puma/puma_http11")
|
@@ -1,8 +1,9 @@
|
|
1
1
|
|
2
|
-
#line 1 "ext/
|
2
|
+
#line 1 "ext/puma_http11/http11_parser.rl"
|
3
3
|
/**
|
4
4
|
* Copyright (c) 2005 Zed A. Shaw
|
5
5
|
* You can redistribute it and/or modify it under the same terms as Ruby.
|
6
|
+
* License 3-clause BSD
|
6
7
|
*/
|
7
8
|
#include "http11_parser.h"
|
8
9
|
#include <stdio.h>
|
@@ -30,30 +31,30 @@ static void snake_upcase_char(char *c)
|
|
30
31
|
/** Machine **/
|
31
32
|
|
32
33
|
|
33
|
-
#line
|
34
|
+
#line 79 "ext/puma_http11/http11_parser.rl"
|
34
35
|
|
35
36
|
|
36
37
|
/** Data **/
|
37
38
|
|
38
|
-
#line
|
39
|
-
static const int
|
40
|
-
static const int
|
41
|
-
static const int
|
39
|
+
#line 40 "ext/puma_http11/http11_parser.c"
|
40
|
+
static const int puma_parser_start = 1;
|
41
|
+
static const int puma_parser_first_final = 46;
|
42
|
+
static const int puma_parser_error = 0;
|
42
43
|
|
43
|
-
static const int
|
44
|
+
static const int puma_parser_en_main = 1;
|
44
45
|
|
45
46
|
|
46
|
-
#line
|
47
|
+
#line 83 "ext/puma_http11/http11_parser.rl"
|
47
48
|
|
48
|
-
int
|
49
|
+
int puma_parser_init(puma_parser *parser) {
|
49
50
|
int cs = 0;
|
50
51
|
|
51
|
-
#line
|
52
|
+
#line 53 "ext/puma_http11/http11_parser.c"
|
52
53
|
{
|
53
|
-
cs =
|
54
|
+
cs = puma_parser_start;
|
54
55
|
}
|
55
56
|
|
56
|
-
#line
|
57
|
+
#line 87 "ext/puma_http11/http11_parser.rl"
|
57
58
|
parser->cs = cs;
|
58
59
|
parser->body_start = 0;
|
59
60
|
parser->content_len = 0;
|
@@ -69,7 +70,7 @@ int http_parser_init(http_parser *parser) {
|
|
69
70
|
|
70
71
|
|
71
72
|
/** exec **/
|
72
|
-
size_t
|
73
|
+
size_t puma_parser_execute(puma_parser *parser, const char *buffer, size_t len, size_t off) {
|
73
74
|
const char *p, *pe;
|
74
75
|
int cs = parser->cs;
|
75
76
|
|
@@ -79,10 +80,10 @@ size_t http_parser_execute(http_parser *parser, const char *buffer, size_t len,
|
|
79
80
|
pe = buffer+len;
|
80
81
|
|
81
82
|
/* assert(*pe == '\0' && "pointer does not end on NUL"); */
|
82
|
-
assert(pe - p == len - off && "pointers aren't same distance");
|
83
|
+
assert((size_t) (pe - p) == len - off && "pointers aren't same distance");
|
83
84
|
|
84
85
|
|
85
|
-
#line
|
86
|
+
#line 87 "ext/puma_http11/http11_parser.c"
|
86
87
|
{
|
87
88
|
if ( p == pe )
|
88
89
|
goto _test_eof;
|
@@ -106,31 +107,31 @@ st0:
|
|
106
107
|
cs = 0;
|
107
108
|
goto _out;
|
108
109
|
tr0:
|
109
|
-
#line
|
110
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
110
111
|
{ MARK(mark, p); }
|
111
112
|
goto st2;
|
112
113
|
st2:
|
113
114
|
if ( ++p == pe )
|
114
115
|
goto _test_eof2;
|
115
116
|
case 2:
|
116
|
-
#line
|
117
|
+
#line 118 "ext/puma_http11/http11_parser.c"
|
117
118
|
switch( (*p) ) {
|
118
119
|
case 32: goto tr2;
|
119
|
-
case 36: goto
|
120
|
-
case 95: goto
|
120
|
+
case 36: goto st27;
|
121
|
+
case 95: goto st27;
|
121
122
|
}
|
122
123
|
if ( (*p) < 48 ) {
|
123
124
|
if ( 45 <= (*p) && (*p) <= 46 )
|
124
|
-
goto
|
125
|
+
goto st27;
|
125
126
|
} else if ( (*p) > 57 ) {
|
126
127
|
if ( 65 <= (*p) && (*p) <= 90 )
|
127
|
-
goto
|
128
|
+
goto st27;
|
128
129
|
} else
|
129
|
-
goto
|
130
|
+
goto st27;
|
130
131
|
goto st0;
|
131
132
|
tr2:
|
132
|
-
#line
|
133
|
-
{
|
133
|
+
#line 48 "ext/puma_http11/http11_parser.rl"
|
134
|
+
{
|
134
135
|
parser->request_method(parser, PTR_TO(mark), LEN(mark, p));
|
135
136
|
}
|
136
137
|
goto st3;
|
@@ -138,7 +139,7 @@ st3:
|
|
138
139
|
if ( ++p == pe )
|
139
140
|
goto _test_eof3;
|
140
141
|
case 3:
|
141
|
-
#line
|
142
|
+
#line 143 "ext/puma_http11/http11_parser.c"
|
142
143
|
switch( (*p) ) {
|
143
144
|
case 42: goto tr4;
|
144
145
|
case 43: goto tr5;
|
@@ -155,68 +156,68 @@ case 3:
|
|
155
156
|
goto tr5;
|
156
157
|
goto st0;
|
157
158
|
tr4:
|
158
|
-
#line
|
159
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
159
160
|
{ MARK(mark, p); }
|
160
161
|
goto st4;
|
161
162
|
st4:
|
162
163
|
if ( ++p == pe )
|
163
164
|
goto _test_eof4;
|
164
165
|
case 4:
|
165
|
-
#line
|
166
|
+
#line 167 "ext/puma_http11/http11_parser.c"
|
166
167
|
switch( (*p) ) {
|
167
168
|
case 32: goto tr8;
|
168
169
|
case 35: goto tr9;
|
169
170
|
}
|
170
171
|
goto st0;
|
171
172
|
tr8:
|
172
|
-
#line
|
173
|
-
{
|
173
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
174
|
+
{
|
174
175
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
175
176
|
}
|
176
177
|
goto st5;
|
177
178
|
tr31:
|
178
|
-
#line
|
179
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
179
180
|
{ MARK(mark, p); }
|
180
|
-
#line
|
181
|
+
#line 54 "ext/puma_http11/http11_parser.rl"
|
181
182
|
{
|
182
183
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
183
184
|
}
|
184
185
|
goto st5;
|
185
|
-
|
186
|
-
#line
|
186
|
+
tr33:
|
187
|
+
#line 54 "ext/puma_http11/http11_parser.rl"
|
187
188
|
{
|
188
189
|
parser->fragment(parser, PTR_TO(mark), LEN(mark, p));
|
189
190
|
}
|
190
191
|
goto st5;
|
191
|
-
|
192
|
-
#line
|
192
|
+
tr37:
|
193
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
193
194
|
{
|
194
195
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
195
196
|
}
|
196
|
-
#line
|
197
|
-
{
|
197
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
198
|
+
{
|
198
199
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
199
200
|
}
|
200
201
|
goto st5;
|
201
|
-
|
202
|
-
#line
|
202
|
+
tr41:
|
203
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
203
204
|
{ MARK(query_start, p); }
|
204
|
-
#line
|
205
|
-
{
|
205
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
206
|
+
{
|
206
207
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
207
208
|
}
|
208
|
-
#line
|
209
|
-
{
|
209
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
210
|
+
{
|
210
211
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
211
212
|
}
|
212
213
|
goto st5;
|
213
|
-
|
214
|
-
#line
|
215
|
-
{
|
214
|
+
tr44:
|
215
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
216
|
+
{
|
216
217
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
217
218
|
}
|
218
|
-
#line
|
219
|
-
{
|
219
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
220
|
+
{
|
220
221
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
221
222
|
}
|
222
223
|
goto st5;
|
@@ -224,19 +225,19 @@ st5:
|
|
224
225
|
if ( ++p == pe )
|
225
226
|
goto _test_eof5;
|
226
227
|
case 5:
|
227
|
-
#line
|
228
|
+
#line 229 "ext/puma_http11/http11_parser.c"
|
228
229
|
if ( (*p) == 72 )
|
229
230
|
goto tr10;
|
230
231
|
goto st0;
|
231
232
|
tr10:
|
232
|
-
#line
|
233
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
233
234
|
{ MARK(mark, p); }
|
234
235
|
goto st6;
|
235
236
|
st6:
|
236
237
|
if ( ++p == pe )
|
237
238
|
goto _test_eof6;
|
238
239
|
case 6:
|
239
|
-
#line
|
240
|
+
#line 241 "ext/puma_http11/http11_parser.c"
|
240
241
|
if ( (*p) == 84 )
|
241
242
|
goto st7;
|
242
243
|
goto st0;
|
@@ -294,21 +295,21 @@ case 13:
|
|
294
295
|
goto st13;
|
295
296
|
goto st0;
|
296
297
|
tr18:
|
297
|
-
#line
|
298
|
-
{
|
298
|
+
#line 63 "ext/puma_http11/http11_parser.rl"
|
299
|
+
{
|
299
300
|
parser->http_version(parser, PTR_TO(mark), LEN(mark, p));
|
300
301
|
}
|
301
302
|
goto st14;
|
302
303
|
tr26:
|
303
|
-
#line
|
304
|
+
#line 44 "ext/puma_http11/http11_parser.rl"
|
304
305
|
{ MARK(mark, p); }
|
305
|
-
#line
|
306
|
+
#line 45 "ext/puma_http11/http11_parser.rl"
|
306
307
|
{
|
307
308
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
308
309
|
}
|
309
310
|
goto st14;
|
310
311
|
tr29:
|
311
|
-
#line
|
312
|
+
#line 45 "ext/puma_http11/http11_parser.rl"
|
312
313
|
{
|
313
314
|
parser->http_field(parser, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
314
315
|
}
|
@@ -317,7 +318,7 @@ st14:
|
|
317
318
|
if ( ++p == pe )
|
318
319
|
goto _test_eof14;
|
319
320
|
case 14:
|
320
|
-
#line
|
321
|
+
#line 322 "ext/puma_http11/http11_parser.c"
|
321
322
|
if ( (*p) == 10 )
|
322
323
|
goto st15;
|
323
324
|
goto st0;
|
@@ -357,34 +358,34 @@ case 16:
|
|
357
358
|
goto tr22;
|
358
359
|
goto st0;
|
359
360
|
tr22:
|
360
|
-
#line
|
361
|
-
{
|
362
|
-
parser->body_start = p - buffer + 1;
|
361
|
+
#line 71 "ext/puma_http11/http11_parser.rl"
|
362
|
+
{
|
363
|
+
parser->body_start = p - buffer + 1;
|
363
364
|
parser->header_done(parser, p + 1, pe - p - 1);
|
364
|
-
{p++; cs =
|
365
|
+
{p++; cs = 46; goto _out;}
|
365
366
|
}
|
366
|
-
goto
|
367
|
-
|
367
|
+
goto st46;
|
368
|
+
st46:
|
368
369
|
if ( ++p == pe )
|
369
|
-
goto
|
370
|
-
case
|
371
|
-
#line
|
370
|
+
goto _test_eof46;
|
371
|
+
case 46:
|
372
|
+
#line 373 "ext/puma_http11/http11_parser.c"
|
372
373
|
goto st0;
|
373
374
|
tr21:
|
374
|
-
#line
|
375
|
+
#line 38 "ext/puma_http11/http11_parser.rl"
|
375
376
|
{ MARK(field_start, p); }
|
376
|
-
#line
|
377
|
+
#line 39 "ext/puma_http11/http11_parser.rl"
|
377
378
|
{ snake_upcase_char((char *)p); }
|
378
379
|
goto st17;
|
379
380
|
tr23:
|
380
|
-
#line
|
381
|
+
#line 39 "ext/puma_http11/http11_parser.rl"
|
381
382
|
{ snake_upcase_char((char *)p); }
|
382
383
|
goto st17;
|
383
384
|
st17:
|
384
385
|
if ( ++p == pe )
|
385
386
|
goto _test_eof17;
|
386
387
|
case 17:
|
387
|
-
#line
|
388
|
+
#line 389 "ext/puma_http11/http11_parser.c"
|
388
389
|
switch( (*p) ) {
|
389
390
|
case 33: goto tr23;
|
390
391
|
case 58: goto tr24;
|
@@ -410,72 +411,72 @@ case 17:
|
|
410
411
|
goto tr23;
|
411
412
|
goto st0;
|
412
413
|
tr24:
|
413
|
-
#line
|
414
|
-
{
|
414
|
+
#line 40 "ext/puma_http11/http11_parser.rl"
|
415
|
+
{
|
415
416
|
parser->field_len = LEN(field_start, p);
|
416
417
|
}
|
417
418
|
goto st18;
|
418
419
|
tr27:
|
419
|
-
#line
|
420
|
+
#line 44 "ext/puma_http11/http11_parser.rl"
|
420
421
|
{ MARK(mark, p); }
|
421
422
|
goto st18;
|
422
423
|
st18:
|
423
424
|
if ( ++p == pe )
|
424
425
|
goto _test_eof18;
|
425
426
|
case 18:
|
426
|
-
#line
|
427
|
+
#line 428 "ext/puma_http11/http11_parser.c"
|
427
428
|
switch( (*p) ) {
|
428
429
|
case 13: goto tr26;
|
429
430
|
case 32: goto tr27;
|
430
431
|
}
|
431
432
|
goto tr25;
|
432
433
|
tr25:
|
433
|
-
#line
|
434
|
+
#line 44 "ext/puma_http11/http11_parser.rl"
|
434
435
|
{ MARK(mark, p); }
|
435
436
|
goto st19;
|
436
437
|
st19:
|
437
438
|
if ( ++p == pe )
|
438
439
|
goto _test_eof19;
|
439
440
|
case 19:
|
440
|
-
#line
|
441
|
+
#line 442 "ext/puma_http11/http11_parser.c"
|
441
442
|
if ( (*p) == 13 )
|
442
443
|
goto tr29;
|
443
444
|
goto st19;
|
444
445
|
tr9:
|
445
|
-
#line
|
446
|
-
{
|
446
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
447
|
+
{
|
447
448
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
448
449
|
}
|
449
450
|
goto st20;
|
450
|
-
|
451
|
-
#line
|
451
|
+
tr38:
|
452
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
452
453
|
{
|
453
454
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
454
455
|
}
|
455
|
-
#line
|
456
|
-
{
|
456
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
457
|
+
{
|
457
458
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
458
459
|
}
|
459
460
|
goto st20;
|
460
|
-
|
461
|
-
#line
|
461
|
+
tr42:
|
462
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
462
463
|
{ MARK(query_start, p); }
|
463
|
-
#line
|
464
|
-
{
|
464
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
465
|
+
{
|
465
466
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
466
467
|
}
|
467
|
-
#line
|
468
|
-
{
|
468
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
469
|
+
{
|
469
470
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
470
471
|
}
|
471
472
|
goto st20;
|
472
|
-
|
473
|
-
#line
|
474
|
-
{
|
473
|
+
tr45:
|
474
|
+
#line 59 "ext/puma_http11/http11_parser.rl"
|
475
|
+
{
|
475
476
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
476
477
|
}
|
477
|
-
#line
|
478
|
-
{
|
478
|
+
#line 51 "ext/puma_http11/http11_parser.rl"
|
479
|
+
{
|
479
480
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
480
481
|
}
|
481
482
|
goto st20;
|
@@ -483,10 +484,9 @@ st20:
|
|
483
484
|
if ( ++p == pe )
|
484
485
|
goto _test_eof20;
|
485
486
|
case 20:
|
486
|
-
#line
|
487
|
+
#line 488 "ext/puma_http11/http11_parser.c"
|
487
488
|
switch( (*p) ) {
|
488
489
|
case 32: goto tr31;
|
489
|
-
case 37: goto tr32;
|
490
490
|
case 60: goto st0;
|
491
491
|
case 62: goto st0;
|
492
492
|
case 127: goto st0;
|
@@ -498,17 +498,16 @@ case 20:
|
|
498
498
|
goto st0;
|
499
499
|
goto tr30;
|
500
500
|
tr30:
|
501
|
-
#line
|
501
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
502
502
|
{ MARK(mark, p); }
|
503
503
|
goto st21;
|
504
504
|
st21:
|
505
505
|
if ( ++p == pe )
|
506
506
|
goto _test_eof21;
|
507
507
|
case 21:
|
508
|
-
#line 509 "ext/
|
508
|
+
#line 509 "ext/puma_http11/http11_parser.c"
|
509
509
|
switch( (*p) ) {
|
510
|
-
case 32: goto
|
511
|
-
case 37: goto st22;
|
510
|
+
case 32: goto tr33;
|
512
511
|
case 60: goto st0;
|
513
512
|
case 62: goto st0;
|
514
513
|
case 127: goto st0;
|
@@ -519,611 +518,442 @@ case 21:
|
|
519
518
|
} else if ( (*p) >= 0 )
|
520
519
|
goto st0;
|
521
520
|
goto st21;
|
522
|
-
|
523
|
-
#line
|
521
|
+
tr5:
|
522
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
524
523
|
{ MARK(mark, p); }
|
525
524
|
goto st22;
|
526
525
|
st22:
|
527
526
|
if ( ++p == pe )
|
528
527
|
goto _test_eof22;
|
529
528
|
case 22:
|
530
|
-
#line
|
531
|
-
if ( (*p) < 65 ) {
|
532
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
533
|
-
goto st23;
|
534
|
-
} else if ( (*p) > 70 ) {
|
535
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
536
|
-
goto st23;
|
537
|
-
} else
|
538
|
-
goto st23;
|
539
|
-
goto st0;
|
540
|
-
st23:
|
541
|
-
if ( ++p == pe )
|
542
|
-
goto _test_eof23;
|
543
|
-
case 23:
|
544
|
-
if ( (*p) < 65 ) {
|
545
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
546
|
-
goto st21;
|
547
|
-
} else if ( (*p) > 70 ) {
|
548
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
549
|
-
goto st21;
|
550
|
-
} else
|
551
|
-
goto st21;
|
552
|
-
goto st0;
|
553
|
-
tr5:
|
554
|
-
#line 34 "ext/http11/http11_parser.rl"
|
555
|
-
{ MARK(mark, p); }
|
556
|
-
goto st24;
|
557
|
-
st24:
|
558
|
-
if ( ++p == pe )
|
559
|
-
goto _test_eof24;
|
560
|
-
case 24:
|
561
|
-
#line 562 "ext/http11/http11_parser.c"
|
529
|
+
#line 530 "ext/puma_http11/http11_parser.c"
|
562
530
|
switch( (*p) ) {
|
563
|
-
case 43: goto
|
564
|
-
case 58: goto
|
531
|
+
case 43: goto st22;
|
532
|
+
case 58: goto st23;
|
565
533
|
}
|
566
534
|
if ( (*p) < 48 ) {
|
567
535
|
if ( 45 <= (*p) && (*p) <= 46 )
|
568
|
-
goto
|
536
|
+
goto st22;
|
569
537
|
} else if ( (*p) > 57 ) {
|
570
538
|
if ( (*p) > 90 ) {
|
571
539
|
if ( 97 <= (*p) && (*p) <= 122 )
|
572
|
-
goto
|
540
|
+
goto st22;
|
573
541
|
} else if ( (*p) >= 65 )
|
574
|
-
goto
|
542
|
+
goto st22;
|
575
543
|
} else
|
576
|
-
goto
|
544
|
+
goto st22;
|
577
545
|
goto st0;
|
578
546
|
tr7:
|
579
|
-
#line
|
547
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
580
548
|
{ MARK(mark, p); }
|
581
|
-
goto
|
582
|
-
|
549
|
+
goto st23;
|
550
|
+
st23:
|
583
551
|
if ( ++p == pe )
|
584
|
-
goto
|
585
|
-
case
|
586
|
-
#line
|
552
|
+
goto _test_eof23;
|
553
|
+
case 23:
|
554
|
+
#line 555 "ext/puma_http11/http11_parser.c"
|
587
555
|
switch( (*p) ) {
|
588
556
|
case 32: goto tr8;
|
589
557
|
case 34: goto st0;
|
590
558
|
case 35: goto tr9;
|
591
|
-
case 37: goto st26;
|
592
559
|
case 60: goto st0;
|
593
560
|
case 62: goto st0;
|
594
561
|
case 127: goto st0;
|
595
562
|
}
|
596
563
|
if ( 0 <= (*p) && (*p) <= 31 )
|
597
564
|
goto st0;
|
598
|
-
goto
|
599
|
-
st26:
|
600
|
-
if ( ++p == pe )
|
601
|
-
goto _test_eof26;
|
602
|
-
case 26:
|
603
|
-
if ( (*p) < 65 ) {
|
604
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
605
|
-
goto st27;
|
606
|
-
} else if ( (*p) > 70 ) {
|
607
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
608
|
-
goto st27;
|
609
|
-
} else
|
610
|
-
goto st27;
|
611
|
-
goto st0;
|
612
|
-
st27:
|
613
|
-
if ( ++p == pe )
|
614
|
-
goto _test_eof27;
|
615
|
-
case 27:
|
616
|
-
if ( (*p) < 65 ) {
|
617
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
618
|
-
goto st25;
|
619
|
-
} else if ( (*p) > 70 ) {
|
620
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
621
|
-
goto st25;
|
622
|
-
} else
|
623
|
-
goto st25;
|
624
|
-
goto st0;
|
565
|
+
goto st23;
|
625
566
|
tr6:
|
626
|
-
#line
|
567
|
+
#line 35 "ext/puma_http11/http11_parser.rl"
|
627
568
|
{ MARK(mark, p); }
|
628
|
-
goto
|
629
|
-
|
630
|
-
if ( ++p == pe )
|
631
|
-
goto _test_eof28;
|
632
|
-
case 28:
|
633
|
-
#line 634 "ext/http11/http11_parser.c"
|
634
|
-
switch( (*p) ) {
|
635
|
-
case 32: goto tr42;
|
636
|
-
case 34: goto st0;
|
637
|
-
case 35: goto tr43;
|
638
|
-
case 37: goto st29;
|
639
|
-
case 59: goto tr45;
|
640
|
-
case 60: goto st0;
|
641
|
-
case 62: goto st0;
|
642
|
-
case 63: goto tr46;
|
643
|
-
case 127: goto st0;
|
644
|
-
}
|
645
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
646
|
-
goto st0;
|
647
|
-
goto st28;
|
648
|
-
st29:
|
649
|
-
if ( ++p == pe )
|
650
|
-
goto _test_eof29;
|
651
|
-
case 29:
|
652
|
-
if ( (*p) < 65 ) {
|
653
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
654
|
-
goto st30;
|
655
|
-
} else if ( (*p) > 70 ) {
|
656
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
657
|
-
goto st30;
|
658
|
-
} else
|
659
|
-
goto st30;
|
660
|
-
goto st0;
|
661
|
-
st30:
|
662
|
-
if ( ++p == pe )
|
663
|
-
goto _test_eof30;
|
664
|
-
case 30:
|
665
|
-
if ( (*p) < 65 ) {
|
666
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
667
|
-
goto st28;
|
668
|
-
} else if ( (*p) > 70 ) {
|
669
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
670
|
-
goto st28;
|
671
|
-
} else
|
672
|
-
goto st28;
|
673
|
-
goto st0;
|
674
|
-
tr45:
|
675
|
-
#line 66 "ext/http11/http11_parser.rl"
|
676
|
-
{
|
677
|
-
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
678
|
-
}
|
679
|
-
goto st31;
|
680
|
-
st31:
|
569
|
+
goto st24;
|
570
|
+
st24:
|
681
571
|
if ( ++p == pe )
|
682
|
-
goto
|
683
|
-
case
|
684
|
-
#line
|
572
|
+
goto _test_eof24;
|
573
|
+
case 24:
|
574
|
+
#line 575 "ext/puma_http11/http11_parser.c"
|
685
575
|
switch( (*p) ) {
|
686
|
-
case 32: goto
|
576
|
+
case 32: goto tr37;
|
687
577
|
case 34: goto st0;
|
688
|
-
case 35: goto
|
689
|
-
case 37: goto st32;
|
578
|
+
case 35: goto tr38;
|
690
579
|
case 60: goto st0;
|
691
580
|
case 62: goto st0;
|
692
|
-
case 63: goto
|
581
|
+
case 63: goto tr39;
|
693
582
|
case 127: goto st0;
|
694
583
|
}
|
695
584
|
if ( 0 <= (*p) && (*p) <= 31 )
|
696
585
|
goto st0;
|
697
|
-
goto
|
698
|
-
|
699
|
-
|
700
|
-
goto _test_eof32;
|
701
|
-
case 32:
|
702
|
-
if ( (*p) < 65 ) {
|
703
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
704
|
-
goto st33;
|
705
|
-
} else if ( (*p) > 70 ) {
|
706
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
707
|
-
goto st33;
|
708
|
-
} else
|
709
|
-
goto st33;
|
710
|
-
goto st0;
|
711
|
-
st33:
|
712
|
-
if ( ++p == pe )
|
713
|
-
goto _test_eof33;
|
714
|
-
case 33:
|
715
|
-
if ( (*p) < 65 ) {
|
716
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
717
|
-
goto st31;
|
718
|
-
} else if ( (*p) > 70 ) {
|
719
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
720
|
-
goto st31;
|
721
|
-
} else
|
722
|
-
goto st31;
|
723
|
-
goto st0;
|
724
|
-
tr46:
|
725
|
-
#line 66 "ext/http11/http11_parser.rl"
|
586
|
+
goto st24;
|
587
|
+
tr39:
|
588
|
+
#line 67 "ext/puma_http11/http11_parser.rl"
|
726
589
|
{
|
727
590
|
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
728
591
|
}
|
729
|
-
goto
|
730
|
-
|
592
|
+
goto st25;
|
593
|
+
st25:
|
731
594
|
if ( ++p == pe )
|
732
|
-
goto
|
733
|
-
case
|
734
|
-
#line
|
595
|
+
goto _test_eof25;
|
596
|
+
case 25:
|
597
|
+
#line 598 "ext/puma_http11/http11_parser.c"
|
735
598
|
switch( (*p) ) {
|
736
|
-
case 32: goto
|
599
|
+
case 32: goto tr41;
|
737
600
|
case 34: goto st0;
|
738
|
-
case 35: goto
|
739
|
-
case 37: goto tr55;
|
601
|
+
case 35: goto tr42;
|
740
602
|
case 60: goto st0;
|
741
603
|
case 62: goto st0;
|
742
604
|
case 127: goto st0;
|
743
605
|
}
|
744
606
|
if ( 0 <= (*p) && (*p) <= 31 )
|
745
607
|
goto st0;
|
746
|
-
goto
|
747
|
-
|
748
|
-
#line
|
608
|
+
goto tr40;
|
609
|
+
tr40:
|
610
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
749
611
|
{ MARK(query_start, p); }
|
750
|
-
goto
|
751
|
-
|
612
|
+
goto st26;
|
613
|
+
st26:
|
752
614
|
if ( ++p == pe )
|
753
|
-
goto
|
754
|
-
case
|
755
|
-
#line
|
615
|
+
goto _test_eof26;
|
616
|
+
case 26:
|
617
|
+
#line 618 "ext/puma_http11/http11_parser.c"
|
756
618
|
switch( (*p) ) {
|
757
|
-
case 32: goto
|
619
|
+
case 32: goto tr44;
|
758
620
|
case 34: goto st0;
|
759
|
-
case 35: goto
|
760
|
-
case 37: goto st36;
|
621
|
+
case 35: goto tr45;
|
761
622
|
case 60: goto st0;
|
762
623
|
case 62: goto st0;
|
763
624
|
case 127: goto st0;
|
764
625
|
}
|
765
626
|
if ( 0 <= (*p) && (*p) <= 31 )
|
766
627
|
goto st0;
|
767
|
-
goto
|
768
|
-
|
769
|
-
#line 57 "ext/http11/http11_parser.rl"
|
770
|
-
{ MARK(query_start, p); }
|
771
|
-
goto st36;
|
772
|
-
st36:
|
773
|
-
if ( ++p == pe )
|
774
|
-
goto _test_eof36;
|
775
|
-
case 36:
|
776
|
-
#line 777 "ext/http11/http11_parser.c"
|
777
|
-
if ( (*p) < 65 ) {
|
778
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
779
|
-
goto st37;
|
780
|
-
} else if ( (*p) > 70 ) {
|
781
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
782
|
-
goto st37;
|
783
|
-
} else
|
784
|
-
goto st37;
|
785
|
-
goto st0;
|
786
|
-
st37:
|
787
|
-
if ( ++p == pe )
|
788
|
-
goto _test_eof37;
|
789
|
-
case 37:
|
790
|
-
if ( (*p) < 65 ) {
|
791
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
792
|
-
goto st35;
|
793
|
-
} else if ( (*p) > 70 ) {
|
794
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
795
|
-
goto st35;
|
796
|
-
} else
|
797
|
-
goto st35;
|
798
|
-
goto st0;
|
799
|
-
st38:
|
628
|
+
goto st26;
|
629
|
+
st27:
|
800
630
|
if ( ++p == pe )
|
801
|
-
goto
|
802
|
-
case
|
631
|
+
goto _test_eof27;
|
632
|
+
case 27:
|
803
633
|
switch( (*p) ) {
|
804
634
|
case 32: goto tr2;
|
805
|
-
case 36: goto
|
806
|
-
case 95: goto
|
635
|
+
case 36: goto st28;
|
636
|
+
case 95: goto st28;
|
807
637
|
}
|
808
638
|
if ( (*p) < 48 ) {
|
809
639
|
if ( 45 <= (*p) && (*p) <= 46 )
|
810
|
-
goto
|
640
|
+
goto st28;
|
811
641
|
} else if ( (*p) > 57 ) {
|
812
642
|
if ( 65 <= (*p) && (*p) <= 90 )
|
813
|
-
goto
|
643
|
+
goto st28;
|
814
644
|
} else
|
815
|
-
goto
|
645
|
+
goto st28;
|
816
646
|
goto st0;
|
817
|
-
|
647
|
+
st28:
|
818
648
|
if ( ++p == pe )
|
819
|
-
goto
|
820
|
-
case
|
649
|
+
goto _test_eof28;
|
650
|
+
case 28:
|
821
651
|
switch( (*p) ) {
|
822
652
|
case 32: goto tr2;
|
823
|
-
case 36: goto
|
824
|
-
case 95: goto
|
653
|
+
case 36: goto st29;
|
654
|
+
case 95: goto st29;
|
825
655
|
}
|
826
656
|
if ( (*p) < 48 ) {
|
827
657
|
if ( 45 <= (*p) && (*p) <= 46 )
|
828
|
-
goto
|
658
|
+
goto st29;
|
829
659
|
} else if ( (*p) > 57 ) {
|
830
660
|
if ( 65 <= (*p) && (*p) <= 90 )
|
831
|
-
goto
|
661
|
+
goto st29;
|
832
662
|
} else
|
833
|
-
goto
|
663
|
+
goto st29;
|
834
664
|
goto st0;
|
835
|
-
|
665
|
+
st29:
|
836
666
|
if ( ++p == pe )
|
837
|
-
goto
|
838
|
-
case
|
667
|
+
goto _test_eof29;
|
668
|
+
case 29:
|
839
669
|
switch( (*p) ) {
|
840
670
|
case 32: goto tr2;
|
841
|
-
case 36: goto
|
842
|
-
case 95: goto
|
671
|
+
case 36: goto st30;
|
672
|
+
case 95: goto st30;
|
843
673
|
}
|
844
674
|
if ( (*p) < 48 ) {
|
845
675
|
if ( 45 <= (*p) && (*p) <= 46 )
|
846
|
-
goto
|
676
|
+
goto st30;
|
847
677
|
} else if ( (*p) > 57 ) {
|
848
678
|
if ( 65 <= (*p) && (*p) <= 90 )
|
849
|
-
goto
|
679
|
+
goto st30;
|
850
680
|
} else
|
851
|
-
goto
|
681
|
+
goto st30;
|
852
682
|
goto st0;
|
853
|
-
|
683
|
+
st30:
|
854
684
|
if ( ++p == pe )
|
855
|
-
goto
|
856
|
-
case
|
685
|
+
goto _test_eof30;
|
686
|
+
case 30:
|
857
687
|
switch( (*p) ) {
|
858
688
|
case 32: goto tr2;
|
859
|
-
case 36: goto
|
860
|
-
case 95: goto
|
689
|
+
case 36: goto st31;
|
690
|
+
case 95: goto st31;
|
861
691
|
}
|
862
692
|
if ( (*p) < 48 ) {
|
863
693
|
if ( 45 <= (*p) && (*p) <= 46 )
|
864
|
-
goto
|
694
|
+
goto st31;
|
865
695
|
} else if ( (*p) > 57 ) {
|
866
696
|
if ( 65 <= (*p) && (*p) <= 90 )
|
867
|
-
goto
|
697
|
+
goto st31;
|
868
698
|
} else
|
869
|
-
goto
|
699
|
+
goto st31;
|
870
700
|
goto st0;
|
871
|
-
|
701
|
+
st31:
|
872
702
|
if ( ++p == pe )
|
873
|
-
goto
|
874
|
-
case
|
703
|
+
goto _test_eof31;
|
704
|
+
case 31:
|
875
705
|
switch( (*p) ) {
|
876
706
|
case 32: goto tr2;
|
877
|
-
case 36: goto
|
878
|
-
case 95: goto
|
707
|
+
case 36: goto st32;
|
708
|
+
case 95: goto st32;
|
879
709
|
}
|
880
710
|
if ( (*p) < 48 ) {
|
881
711
|
if ( 45 <= (*p) && (*p) <= 46 )
|
882
|
-
goto
|
712
|
+
goto st32;
|
883
713
|
} else if ( (*p) > 57 ) {
|
884
714
|
if ( 65 <= (*p) && (*p) <= 90 )
|
885
|
-
goto
|
715
|
+
goto st32;
|
886
716
|
} else
|
887
|
-
goto
|
717
|
+
goto st32;
|
888
718
|
goto st0;
|
889
|
-
|
719
|
+
st32:
|
890
720
|
if ( ++p == pe )
|
891
|
-
goto
|
892
|
-
case
|
721
|
+
goto _test_eof32;
|
722
|
+
case 32:
|
893
723
|
switch( (*p) ) {
|
894
724
|
case 32: goto tr2;
|
895
|
-
case 36: goto
|
896
|
-
case 95: goto
|
725
|
+
case 36: goto st33;
|
726
|
+
case 95: goto st33;
|
897
727
|
}
|
898
728
|
if ( (*p) < 48 ) {
|
899
729
|
if ( 45 <= (*p) && (*p) <= 46 )
|
900
|
-
goto
|
730
|
+
goto st33;
|
901
731
|
} else if ( (*p) > 57 ) {
|
902
732
|
if ( 65 <= (*p) && (*p) <= 90 )
|
903
|
-
goto
|
733
|
+
goto st33;
|
904
734
|
} else
|
905
|
-
goto
|
735
|
+
goto st33;
|
906
736
|
goto st0;
|
907
|
-
|
737
|
+
st33:
|
908
738
|
if ( ++p == pe )
|
909
|
-
goto
|
910
|
-
case
|
739
|
+
goto _test_eof33;
|
740
|
+
case 33:
|
911
741
|
switch( (*p) ) {
|
912
742
|
case 32: goto tr2;
|
913
|
-
case 36: goto
|
914
|
-
case 95: goto
|
743
|
+
case 36: goto st34;
|
744
|
+
case 95: goto st34;
|
915
745
|
}
|
916
746
|
if ( (*p) < 48 ) {
|
917
747
|
if ( 45 <= (*p) && (*p) <= 46 )
|
918
|
-
goto
|
748
|
+
goto st34;
|
919
749
|
} else if ( (*p) > 57 ) {
|
920
750
|
if ( 65 <= (*p) && (*p) <= 90 )
|
921
|
-
goto
|
751
|
+
goto st34;
|
922
752
|
} else
|
923
|
-
goto
|
753
|
+
goto st34;
|
924
754
|
goto st0;
|
925
|
-
|
755
|
+
st34:
|
926
756
|
if ( ++p == pe )
|
927
|
-
goto
|
928
|
-
case
|
757
|
+
goto _test_eof34;
|
758
|
+
case 34:
|
929
759
|
switch( (*p) ) {
|
930
760
|
case 32: goto tr2;
|
931
|
-
case 36: goto
|
932
|
-
case 95: goto
|
761
|
+
case 36: goto st35;
|
762
|
+
case 95: goto st35;
|
933
763
|
}
|
934
764
|
if ( (*p) < 48 ) {
|
935
765
|
if ( 45 <= (*p) && (*p) <= 46 )
|
936
|
-
goto
|
766
|
+
goto st35;
|
937
767
|
} else if ( (*p) > 57 ) {
|
938
768
|
if ( 65 <= (*p) && (*p) <= 90 )
|
939
|
-
goto
|
769
|
+
goto st35;
|
940
770
|
} else
|
941
|
-
goto
|
771
|
+
goto st35;
|
942
772
|
goto st0;
|
943
|
-
|
773
|
+
st35:
|
944
774
|
if ( ++p == pe )
|
945
|
-
goto
|
946
|
-
case
|
775
|
+
goto _test_eof35;
|
776
|
+
case 35:
|
947
777
|
switch( (*p) ) {
|
948
778
|
case 32: goto tr2;
|
949
|
-
case 36: goto
|
950
|
-
case 95: goto
|
779
|
+
case 36: goto st36;
|
780
|
+
case 95: goto st36;
|
951
781
|
}
|
952
782
|
if ( (*p) < 48 ) {
|
953
783
|
if ( 45 <= (*p) && (*p) <= 46 )
|
954
|
-
goto
|
784
|
+
goto st36;
|
955
785
|
} else if ( (*p) > 57 ) {
|
956
786
|
if ( 65 <= (*p) && (*p) <= 90 )
|
957
|
-
goto
|
787
|
+
goto st36;
|
958
788
|
} else
|
959
|
-
goto
|
789
|
+
goto st36;
|
960
790
|
goto st0;
|
961
|
-
|
791
|
+
st36:
|
962
792
|
if ( ++p == pe )
|
963
|
-
goto
|
964
|
-
case
|
793
|
+
goto _test_eof36;
|
794
|
+
case 36:
|
965
795
|
switch( (*p) ) {
|
966
796
|
case 32: goto tr2;
|
967
|
-
case 36: goto
|
968
|
-
case 95: goto
|
797
|
+
case 36: goto st37;
|
798
|
+
case 95: goto st37;
|
969
799
|
}
|
970
800
|
if ( (*p) < 48 ) {
|
971
801
|
if ( 45 <= (*p) && (*p) <= 46 )
|
972
|
-
goto
|
802
|
+
goto st37;
|
973
803
|
} else if ( (*p) > 57 ) {
|
974
804
|
if ( 65 <= (*p) && (*p) <= 90 )
|
975
|
-
goto
|
805
|
+
goto st37;
|
976
806
|
} else
|
977
|
-
goto
|
807
|
+
goto st37;
|
978
808
|
goto st0;
|
979
|
-
|
809
|
+
st37:
|
980
810
|
if ( ++p == pe )
|
981
|
-
goto
|
982
|
-
case
|
811
|
+
goto _test_eof37;
|
812
|
+
case 37:
|
983
813
|
switch( (*p) ) {
|
984
814
|
case 32: goto tr2;
|
985
|
-
case 36: goto
|
986
|
-
case 95: goto
|
815
|
+
case 36: goto st38;
|
816
|
+
case 95: goto st38;
|
987
817
|
}
|
988
818
|
if ( (*p) < 48 ) {
|
989
819
|
if ( 45 <= (*p) && (*p) <= 46 )
|
990
|
-
goto
|
820
|
+
goto st38;
|
991
821
|
} else if ( (*p) > 57 ) {
|
992
822
|
if ( 65 <= (*p) && (*p) <= 90 )
|
993
|
-
goto
|
823
|
+
goto st38;
|
994
824
|
} else
|
995
|
-
goto
|
825
|
+
goto st38;
|
996
826
|
goto st0;
|
997
|
-
|
827
|
+
st38:
|
998
828
|
if ( ++p == pe )
|
999
|
-
goto
|
1000
|
-
case
|
829
|
+
goto _test_eof38;
|
830
|
+
case 38:
|
1001
831
|
switch( (*p) ) {
|
1002
832
|
case 32: goto tr2;
|
1003
|
-
case 36: goto
|
1004
|
-
case 95: goto
|
833
|
+
case 36: goto st39;
|
834
|
+
case 95: goto st39;
|
1005
835
|
}
|
1006
836
|
if ( (*p) < 48 ) {
|
1007
837
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1008
|
-
goto
|
838
|
+
goto st39;
|
1009
839
|
} else if ( (*p) > 57 ) {
|
1010
840
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1011
|
-
goto
|
841
|
+
goto st39;
|
1012
842
|
} else
|
1013
|
-
goto
|
843
|
+
goto st39;
|
1014
844
|
goto st0;
|
1015
|
-
|
845
|
+
st39:
|
1016
846
|
if ( ++p == pe )
|
1017
|
-
goto
|
1018
|
-
case
|
847
|
+
goto _test_eof39;
|
848
|
+
case 39:
|
1019
849
|
switch( (*p) ) {
|
1020
850
|
case 32: goto tr2;
|
1021
|
-
case 36: goto
|
1022
|
-
case 95: goto
|
851
|
+
case 36: goto st40;
|
852
|
+
case 95: goto st40;
|
1023
853
|
}
|
1024
854
|
if ( (*p) < 48 ) {
|
1025
855
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1026
|
-
goto
|
856
|
+
goto st40;
|
1027
857
|
} else if ( (*p) > 57 ) {
|
1028
858
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1029
|
-
goto
|
859
|
+
goto st40;
|
1030
860
|
} else
|
1031
|
-
goto
|
861
|
+
goto st40;
|
1032
862
|
goto st0;
|
1033
|
-
|
863
|
+
st40:
|
1034
864
|
if ( ++p == pe )
|
1035
|
-
goto
|
1036
|
-
case
|
865
|
+
goto _test_eof40;
|
866
|
+
case 40:
|
1037
867
|
switch( (*p) ) {
|
1038
868
|
case 32: goto tr2;
|
1039
|
-
case 36: goto
|
1040
|
-
case 95: goto
|
869
|
+
case 36: goto st41;
|
870
|
+
case 95: goto st41;
|
1041
871
|
}
|
1042
872
|
if ( (*p) < 48 ) {
|
1043
873
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1044
|
-
goto
|
874
|
+
goto st41;
|
1045
875
|
} else if ( (*p) > 57 ) {
|
1046
876
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1047
|
-
goto
|
877
|
+
goto st41;
|
1048
878
|
} else
|
1049
|
-
goto
|
879
|
+
goto st41;
|
1050
880
|
goto st0;
|
1051
|
-
|
881
|
+
st41:
|
1052
882
|
if ( ++p == pe )
|
1053
|
-
goto
|
1054
|
-
case
|
883
|
+
goto _test_eof41;
|
884
|
+
case 41:
|
1055
885
|
switch( (*p) ) {
|
1056
886
|
case 32: goto tr2;
|
1057
|
-
case 36: goto
|
1058
|
-
case 95: goto
|
887
|
+
case 36: goto st42;
|
888
|
+
case 95: goto st42;
|
1059
889
|
}
|
1060
890
|
if ( (*p) < 48 ) {
|
1061
891
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1062
|
-
goto
|
892
|
+
goto st42;
|
1063
893
|
} else if ( (*p) > 57 ) {
|
1064
894
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1065
|
-
goto
|
895
|
+
goto st42;
|
1066
896
|
} else
|
1067
|
-
goto
|
897
|
+
goto st42;
|
1068
898
|
goto st0;
|
1069
|
-
|
899
|
+
st42:
|
1070
900
|
if ( ++p == pe )
|
1071
|
-
goto
|
1072
|
-
case
|
901
|
+
goto _test_eof42;
|
902
|
+
case 42:
|
1073
903
|
switch( (*p) ) {
|
1074
904
|
case 32: goto tr2;
|
1075
|
-
case 36: goto
|
1076
|
-
case 95: goto
|
905
|
+
case 36: goto st43;
|
906
|
+
case 95: goto st43;
|
1077
907
|
}
|
1078
908
|
if ( (*p) < 48 ) {
|
1079
909
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1080
|
-
goto
|
910
|
+
goto st43;
|
1081
911
|
} else if ( (*p) > 57 ) {
|
1082
912
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1083
|
-
goto
|
913
|
+
goto st43;
|
1084
914
|
} else
|
1085
|
-
goto
|
915
|
+
goto st43;
|
1086
916
|
goto st0;
|
1087
|
-
|
917
|
+
st43:
|
1088
918
|
if ( ++p == pe )
|
1089
|
-
goto
|
1090
|
-
case
|
919
|
+
goto _test_eof43;
|
920
|
+
case 43:
|
1091
921
|
switch( (*p) ) {
|
1092
922
|
case 32: goto tr2;
|
1093
|
-
case 36: goto
|
1094
|
-
case 95: goto
|
923
|
+
case 36: goto st44;
|
924
|
+
case 95: goto st44;
|
1095
925
|
}
|
1096
926
|
if ( (*p) < 48 ) {
|
1097
927
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1098
|
-
goto
|
928
|
+
goto st44;
|
1099
929
|
} else if ( (*p) > 57 ) {
|
1100
930
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1101
|
-
goto
|
931
|
+
goto st44;
|
1102
932
|
} else
|
1103
|
-
goto
|
933
|
+
goto st44;
|
1104
934
|
goto st0;
|
1105
|
-
|
935
|
+
st44:
|
1106
936
|
if ( ++p == pe )
|
1107
|
-
goto
|
1108
|
-
case
|
937
|
+
goto _test_eof44;
|
938
|
+
case 44:
|
1109
939
|
switch( (*p) ) {
|
1110
940
|
case 32: goto tr2;
|
1111
|
-
case 36: goto
|
1112
|
-
case 95: goto
|
941
|
+
case 36: goto st45;
|
942
|
+
case 95: goto st45;
|
1113
943
|
}
|
1114
944
|
if ( (*p) < 48 ) {
|
1115
945
|
if ( 45 <= (*p) && (*p) <= 46 )
|
1116
|
-
goto
|
946
|
+
goto st45;
|
1117
947
|
} else if ( (*p) > 57 ) {
|
1118
948
|
if ( 65 <= (*p) && (*p) <= 90 )
|
1119
|
-
goto
|
949
|
+
goto st45;
|
1120
950
|
} else
|
1121
|
-
goto
|
951
|
+
goto st45;
|
1122
952
|
goto st0;
|
1123
|
-
|
953
|
+
st45:
|
1124
954
|
if ( ++p == pe )
|
1125
|
-
goto
|
1126
|
-
case
|
955
|
+
goto _test_eof45;
|
956
|
+
case 45:
|
1127
957
|
if ( (*p) == 32 )
|
1128
958
|
goto tr2;
|
1129
959
|
goto st0;
|
@@ -1143,7 +973,7 @@ case 56:
|
|
1143
973
|
_test_eof14: cs = 14; goto _test_eof;
|
1144
974
|
_test_eof15: cs = 15; goto _test_eof;
|
1145
975
|
_test_eof16: cs = 16; goto _test_eof;
|
1146
|
-
|
976
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1147
977
|
_test_eof17: cs = 17; goto _test_eof;
|
1148
978
|
_test_eof18: cs = 18; goto _test_eof;
|
1149
979
|
_test_eof19: cs = 19; goto _test_eof;
|
@@ -1173,25 +1003,14 @@ case 56:
|
|
1173
1003
|
_test_eof43: cs = 43; goto _test_eof;
|
1174
1004
|
_test_eof44: cs = 44; goto _test_eof;
|
1175
1005
|
_test_eof45: cs = 45; goto _test_eof;
|
1176
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1177
|
-
_test_eof47: cs = 47; goto _test_eof;
|
1178
|
-
_test_eof48: cs = 48; goto _test_eof;
|
1179
|
-
_test_eof49: cs = 49; goto _test_eof;
|
1180
|
-
_test_eof50: cs = 50; goto _test_eof;
|
1181
|
-
_test_eof51: cs = 51; goto _test_eof;
|
1182
|
-
_test_eof52: cs = 52; goto _test_eof;
|
1183
|
-
_test_eof53: cs = 53; goto _test_eof;
|
1184
|
-
_test_eof54: cs = 54; goto _test_eof;
|
1185
|
-
_test_eof55: cs = 55; goto _test_eof;
|
1186
|
-
_test_eof56: cs = 56; goto _test_eof;
|
1187
1006
|
|
1188
1007
|
_test_eof: {}
|
1189
1008
|
_out: {}
|
1190
1009
|
}
|
1191
1010
|
|
1192
|
-
#line
|
1011
|
+
#line 115 "ext/puma_http11/http11_parser.rl"
|
1193
1012
|
|
1194
|
-
if (!
|
1013
|
+
if (!puma_parser_has_error(parser))
|
1195
1014
|
parser->cs = cs;
|
1196
1015
|
parser->nread += p - (buffer + off);
|
1197
1016
|
|
@@ -1205,21 +1024,21 @@ case 56:
|
|
1205
1024
|
return(parser->nread);
|
1206
1025
|
}
|
1207
1026
|
|
1208
|
-
int
|
1027
|
+
int puma_parser_finish(puma_parser *parser)
|
1209
1028
|
{
|
1210
|
-
if (
|
1029
|
+
if (puma_parser_has_error(parser) ) {
|
1211
1030
|
return -1;
|
1212
|
-
} else if (
|
1031
|
+
} else if (puma_parser_is_finished(parser) ) {
|
1213
1032
|
return 1;
|
1214
1033
|
} else {
|
1215
1034
|
return 0;
|
1216
1035
|
}
|
1217
1036
|
}
|
1218
1037
|
|
1219
|
-
int
|
1220
|
-
return parser->cs ==
|
1038
|
+
int puma_parser_has_error(puma_parser *parser) {
|
1039
|
+
return parser->cs == puma_parser_error;
|
1221
1040
|
}
|
1222
1041
|
|
1223
|
-
int
|
1224
|
-
return parser->cs >=
|
1042
|
+
int puma_parser_is_finished(puma_parser *parser) {
|
1043
|
+
return parser->cs >= puma_parser_first_final;
|
1225
1044
|
}
|