unicorn 0.9.1 → 0.9.2
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.
- data/.gitignore +1 -1
- data/CHANGELOG +1 -0
- data/GNUmakefile +15 -15
- data/Manifest +6 -6
- data/README +11 -4
- data/Rakefile +5 -5
- data/ext/{unicorn/http11 → unicorn_http}/ext_help.h +0 -0
- data/ext/unicorn_http/extconf.rb +5 -0
- data/ext/{unicorn/http11/http11.c → unicorn_http/unicorn_http.c} +2 -2
- data/ext/{unicorn/http11/http11_parser.h → unicorn_http/unicorn_http.h} +87 -87
- data/ext/{unicorn/http11/http11_parser.rl → unicorn_http/unicorn_http.rl} +4 -4
- data/ext/{unicorn/http11/http11_parser_common.rl → unicorn_http/unicorn_http_common.rl} +2 -2
- data/lib/unicorn.rb +10 -13
- data/lib/unicorn/app/exec_cgi.rb +3 -9
- data/lib/unicorn/chunked_reader.rb +1 -18
- data/lib/unicorn/const.rb +1 -1
- data/lib/unicorn/http_request.rb +5 -7
- data/lib/unicorn/tee_input.rb +19 -21
- data/lib/unicorn/trailer_parser.rb +1 -1
- data/lib/unicorn/util.rb +17 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/test_chunked_reader.rb +2 -59
- data/test/unit/test_tee_input.rb +66 -0
- data/test/unit/test_trailer_parser.rb +1 -1
- data/test/unit/test_util.rb +30 -28
- data/unicorn.gemspec +6 -6
- metadata +22 -21
- data/ext/unicorn/http11/extconf.rb +0 -5
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
data/GNUmakefile
CHANGED
@@ -27,30 +27,30 @@ T_n_log := $(subst .n,$(log_suffix),$(T_n))
|
|
27
27
|
T_r_log := $(subst .r,$(log_suffix),$(T_r))
|
28
28
|
test_prefix = $(CURDIR)/test/install-$(RUBY_VERSION)
|
29
29
|
|
30
|
-
ext := ext/
|
31
|
-
c_files := $(addprefix $(ext)/,ext_help.h
|
32
|
-
rl_files := $(addprefix $(ext)/,
|
30
|
+
ext := ext/unicorn_http
|
31
|
+
c_files := $(addprefix $(ext)/,ext_help.h unicorn_http.c unicorn_http.h)
|
32
|
+
rl_files := $(addprefix $(ext)/,unicorn_http.rl unicorn_http_common.rl)
|
33
33
|
rb_files := $(shell grep '^\(bin\|lib\)' Manifest)
|
34
34
|
inst_deps := $(c_files) $(rb_files)
|
35
35
|
|
36
|
-
ragel: $(ext)/
|
37
|
-
$(ext)/
|
38
|
-
cd $(@D) && $(ragel)
|
36
|
+
ragel: $(ext)/unicorn_http.h
|
37
|
+
$(ext)/unicorn_http.h: $(rl_files)
|
38
|
+
cd $(@D) && $(ragel) unicorn_http.rl -C $(RLFLAGS) -o $(@F)
|
39
39
|
$(ruby) -i -p -e '$$_.gsub!(%r{[ \t]*$$},"")' $@
|
40
40
|
$(ext)/Makefile: $(ext)/extconf.rb $(c_files)
|
41
41
|
cd $(@D) && $(ruby) extconf.rb
|
42
|
-
$(ext)/
|
42
|
+
$(ext)/unicorn_http.$(DLEXT): $(ext)/Makefile
|
43
43
|
$(MAKE) -C $(@D)
|
44
|
-
lib/
|
44
|
+
lib/unicorn_http.$(DLEXT): $(ext)/unicorn_http.$(DLEXT)
|
45
45
|
@mkdir -p lib
|
46
46
|
install -m644 $< $@
|
47
|
-
|
47
|
+
http: lib/unicorn_http.$(DLEXT)
|
48
48
|
|
49
49
|
$(test_prefix)/.stamp: $(inst_deps)
|
50
50
|
mkdir -p $(test_prefix)/.ccache
|
51
|
-
tar c
|
51
|
+
tar c `cat Manifest` | (cd $(test_prefix) && tar x)
|
52
52
|
$(MAKE) -C $(test_prefix) clean
|
53
|
-
$(MAKE) -C $(test_prefix)
|
53
|
+
$(MAKE) -C $(test_prefix) http shebang
|
54
54
|
> $@
|
55
55
|
|
56
56
|
bins := $(wildcard bin/*)
|
@@ -92,14 +92,14 @@ run_test = $(quiet_pre) \
|
|
92
92
|
%.n: arg = $(subst .n,,$(subst --, -n ,$@))
|
93
93
|
%.n: t = $(subst .n,$(log_suffix),$@)
|
94
94
|
%.n: export PATH := $(test_prefix)/bin:$(PATH)
|
95
|
-
%.n: export RUBYLIB := $(test_prefix)/lib:$(RUBYLIB)
|
95
|
+
%.n: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(RUBYLIB)
|
96
96
|
%.n: $(test_prefix)/.stamp
|
97
97
|
$(run_test)
|
98
98
|
|
99
99
|
$(T): arg = $@
|
100
100
|
$(T): t = $(subst .rb,$(log_suffix),$@)
|
101
101
|
$(T): export PATH := $(test_prefix)/bin:$(PATH)
|
102
|
-
$(T): export RUBYLIB := $(test_prefix)/lib:$(RUBYLIB)
|
102
|
+
$(T): export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(RUBYLIB)
|
103
103
|
$(T): $(test_prefix)/.stamp
|
104
104
|
$(run_test)
|
105
105
|
|
@@ -119,7 +119,7 @@ prep_setup_rb := @-$(RM) $(setup_rb_files);$(MAKE) -C $(ext) clean
|
|
119
119
|
|
120
120
|
clean:
|
121
121
|
-$(MAKE) -C $(ext) clean
|
122
|
-
$(RM) $(ext)/Makefile lib/
|
122
|
+
$(RM) $(ext)/Makefile lib/unicorn_http.$(DLEXT)
|
123
123
|
$(RM) $(setup_rb_files) $(t_log)
|
124
124
|
$(RM) -r $(test_prefix)
|
125
125
|
|
@@ -145,7 +145,7 @@ $(T_r).%.r: rv = $(subst .r,,$(subst $(T_r).,,$@))
|
|
145
145
|
$(T_r).%.r: extra = ' 'v$(rv)
|
146
146
|
$(T_r).%.r: arg = $(T_r)
|
147
147
|
$(T_r).%.r: export PATH := $(test_prefix)/bin:$(PATH)
|
148
|
-
$(T_r).%.r: export RUBYLIB := $(test_prefix)/lib:$(RUBYLIB)
|
148
|
+
$(T_r).%.r: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(RUBYLIB)
|
149
149
|
$(T_r).%.r: export UNICORN_RAILS_TEST_VERSION = $(rv)
|
150
150
|
$(T_r).%.r: export RAILS_GIT_REPO = $(CURDIR)/$(rails_git)
|
151
151
|
$(T_r).%.r: $(test_prefix)/.stamp $(rails_git)/info/cloned-stamp
|
data/Manifest
CHANGED
@@ -18,12 +18,12 @@ bin/unicorn_rails
|
|
18
18
|
examples/echo.ru
|
19
19
|
examples/git.ru
|
20
20
|
examples/init.sh
|
21
|
-
ext/
|
22
|
-
ext/
|
23
|
-
ext/
|
24
|
-
ext/
|
25
|
-
ext/
|
26
|
-
ext/
|
21
|
+
ext/unicorn_http/ext_help.h
|
22
|
+
ext/unicorn_http/extconf.rb
|
23
|
+
ext/unicorn_http/unicorn_http.c
|
24
|
+
ext/unicorn_http/unicorn_http.h
|
25
|
+
ext/unicorn_http/unicorn_http.rl
|
26
|
+
ext/unicorn_http/unicorn_http_common.rl
|
27
27
|
lib/unicorn.rb
|
28
28
|
lib/unicorn/app/exec_cgi.rb
|
29
29
|
lib/unicorn/app/inetd.rb
|
data/README
CHANGED
@@ -48,6 +48,12 @@
|
|
48
48
|
each worker process can also bind to a private port via the
|
49
49
|
after_fork hook for easy debugging.
|
50
50
|
|
51
|
+
== Versions
|
52
|
+
|
53
|
+
{Stable v0.8.2}[http://git.bogomips.org/cgit/unicorn.git/tag/?id=v0.8.2]
|
54
|
+
|
55
|
+
{Development v0.9.1}[http://git.bogomips.org/cgit/unicorn.git/tag/?id=v0.9.1]
|
56
|
+
|
51
57
|
== License
|
52
58
|
|
53
59
|
Unicorn is copyright 2009 Eric Wong and contributors.
|
@@ -61,8 +67,8 @@ Unicorn is 100% Free Software.
|
|
61
67
|
|
62
68
|
== Install
|
63
69
|
|
64
|
-
The library consists of a C extension so you'll need a C compiler
|
65
|
-
|
70
|
+
The library consists of a C extension so you'll need a C compiler
|
71
|
+
and Ruby development libraries/headers.
|
66
72
|
|
67
73
|
You may download the tarball from the Mongrel project page on Rubyforge
|
68
74
|
and run setup.rb after unpacking it:
|
@@ -71,7 +77,7 @@ http://rubyforge.org/frs/?group_id=1306
|
|
71
77
|
|
72
78
|
You may also install it via Rubygems on Rubyforge:
|
73
79
|
|
74
|
-
gem install unicorn
|
80
|
+
gem install unicorn -v0.8.2
|
75
81
|
|
76
82
|
You can get the latest source via git from the following locations
|
77
83
|
(these versions may not be stable):
|
@@ -148,11 +154,12 @@ regarding this.
|
|
148
154
|
== Contact
|
149
155
|
|
150
156
|
All feedback (bug reports, user/development dicussion, patches, pull
|
151
|
-
requests) go to the mailing list. Patches must be sent inline
|
157
|
+
requests) go to the mailing list/newsgroup. Patches must be sent inline
|
152
158
|
(git format-patch -M + git send-email). No subscription is necessary
|
153
159
|
to post on the mailing list. No top posting. Address replies +To:+ (or
|
154
160
|
+Cc:+) the original sender and +Cc:+ the mailing list.
|
155
161
|
|
156
162
|
* email: mongrel-unicorn@rubyforge.org
|
163
|
+
* nntp: nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
|
157
164
|
* archives: http://rubyforge.org/pipermail/mongrel-unicorn/
|
158
165
|
* subscribe: http://rubyforge.org/mailman/listinfo/mongrel-unicorn/
|
data/Rakefile
CHANGED
@@ -6,9 +6,9 @@ Echoe.new("unicorn") do |p|
|
|
6
6
|
p.summary = "Rack HTTP server for Unix, fast clients and nothing else"
|
7
7
|
p.author = "Eric Wong"
|
8
8
|
p.email = "normalperson@yhbt.net"
|
9
|
-
p.clean_pattern = ['ext/
|
9
|
+
p.clean_pattern = ['ext/unicorn_http/*.{bundle,so,o,obj,pdb,lib,def,exp}',
|
10
10
|
'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}',
|
11
|
-
'ext/
|
11
|
+
'ext/unicorn_http/Makefile',
|
12
12
|
'pkg', 'lib/*.bundle', '*.gem',
|
13
13
|
'site/output', '.config', 'coverage',
|
14
14
|
'test_*.log', 'log', 'doc']
|
@@ -29,10 +29,10 @@ end
|
|
29
29
|
|
30
30
|
desc "Rebuild the Ragel sources"
|
31
31
|
task :ragel do
|
32
|
-
Dir.chdir "ext/
|
33
|
-
target = "
|
32
|
+
Dir.chdir "ext/unicorn_http" do
|
33
|
+
target = "unicorn_http.c"
|
34
34
|
File.unlink target if File.exist? target
|
35
|
-
sh "ragel
|
35
|
+
sh "ragel unicorn_http.rl -C -G2 -o #{target}"
|
36
36
|
raise "Failed to build C source" unless File.exist? target
|
37
37
|
end
|
38
38
|
end
|
File without changes
|
@@ -7,7 +7,7 @@
|
|
7
7
|
#include "ext_help.h"
|
8
8
|
#include <assert.h>
|
9
9
|
#include <string.h>
|
10
|
-
#include "
|
10
|
+
#include "unicorn_http.h"
|
11
11
|
|
12
12
|
static http_parser *data_get(VALUE self)
|
13
13
|
{
|
@@ -421,7 +421,7 @@ static VALUE HttpParser_execute(VALUE self, VALUE req_hash, VALUE data)
|
|
421
421
|
rb_raise(eHttpParserError, "Requested start is after data buffer end.");
|
422
422
|
}
|
423
423
|
|
424
|
-
void
|
424
|
+
void Init_unicorn_http(void)
|
425
425
|
{
|
426
426
|
mUnicorn = rb_define_module("Unicorn");
|
427
427
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
#line 1 "
|
2
|
+
#line 1 "unicorn_http.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
6
|
*/
|
7
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef unicorn_http_h
|
8
|
+
#define unicorn_http_h
|
9
9
|
|
10
10
|
#include <sys/types.h>
|
11
11
|
|
@@ -61,12 +61,12 @@ static void downcase_char(char *c)
|
|
61
61
|
/** Machine **/
|
62
62
|
|
63
63
|
|
64
|
-
#line 109 "
|
64
|
+
#line 109 "unicorn_http.rl"
|
65
65
|
|
66
66
|
|
67
67
|
/** Data **/
|
68
68
|
|
69
|
-
#line 70 "
|
69
|
+
#line 70 "unicorn_http.h"
|
70
70
|
static const int http_parser_start = 1;
|
71
71
|
static const int http_parser_first_final = 63;
|
72
72
|
static const int http_parser_error = 0;
|
@@ -74,18 +74,18 @@ static const int http_parser_error = 0;
|
|
74
74
|
static const int http_parser_en_main = 1;
|
75
75
|
|
76
76
|
|
77
|
-
#line 113 "
|
77
|
+
#line 113 "unicorn_http.rl"
|
78
78
|
|
79
79
|
static void http_parser_init(http_parser *parser) {
|
80
80
|
int cs = 0;
|
81
81
|
memset(parser, 0, sizeof(*parser));
|
82
82
|
|
83
|
-
#line 84 "
|
83
|
+
#line 84 "unicorn_http.h"
|
84
84
|
{
|
85
85
|
cs = http_parser_start;
|
86
86
|
}
|
87
87
|
|
88
|
-
#line 118 "
|
88
|
+
#line 118 "unicorn_http.rl"
|
89
89
|
parser->cs = cs;
|
90
90
|
}
|
91
91
|
|
@@ -106,7 +106,7 @@ static void http_parser_execute(
|
|
106
106
|
assert(pe - p == len - off && "pointers aren't same distance");
|
107
107
|
|
108
108
|
|
109
|
-
#line 110 "
|
109
|
+
#line 110 "unicorn_http.h"
|
110
110
|
{
|
111
111
|
if ( p == pe )
|
112
112
|
goto _test_eof;
|
@@ -130,14 +130,14 @@ st0:
|
|
130
130
|
cs = 0;
|
131
131
|
goto _out;
|
132
132
|
tr0:
|
133
|
-
#line 64 "
|
133
|
+
#line 64 "unicorn_http.rl"
|
134
134
|
{MARK(mark, p); }
|
135
135
|
goto st2;
|
136
136
|
st2:
|
137
137
|
if ( ++p == pe )
|
138
138
|
goto _test_eof2;
|
139
139
|
case 2:
|
140
|
-
#line 141 "
|
140
|
+
#line 141 "unicorn_http.h"
|
141
141
|
switch( (*p) ) {
|
142
142
|
case 32: goto tr2;
|
143
143
|
case 36: goto st44;
|
@@ -153,7 +153,7 @@ case 2:
|
|
153
153
|
goto st44;
|
154
154
|
goto st0;
|
155
155
|
tr2:
|
156
|
-
#line 77 "
|
156
|
+
#line 77 "unicorn_http.rl"
|
157
157
|
{
|
158
158
|
request_method(parser->data, PTR_TO(mark), LEN(mark, p));
|
159
159
|
}
|
@@ -162,7 +162,7 @@ st3:
|
|
162
162
|
if ( ++p == pe )
|
163
163
|
goto _test_eof3;
|
164
164
|
case 3:
|
165
|
-
#line 166 "
|
165
|
+
#line 166 "unicorn_http.h"
|
166
166
|
switch( (*p) ) {
|
167
167
|
case 42: goto tr4;
|
168
168
|
case 47: goto tr5;
|
@@ -171,67 +171,67 @@ case 3:
|
|
171
171
|
}
|
172
172
|
goto st0;
|
173
173
|
tr4:
|
174
|
-
#line 64 "
|
174
|
+
#line 64 "unicorn_http.rl"
|
175
175
|
{MARK(mark, p); }
|
176
176
|
goto st4;
|
177
177
|
st4:
|
178
178
|
if ( ++p == pe )
|
179
179
|
goto _test_eof4;
|
180
180
|
case 4:
|
181
|
-
#line 182 "
|
181
|
+
#line 182 "unicorn_http.h"
|
182
182
|
switch( (*p) ) {
|
183
183
|
case 32: goto tr7;
|
184
184
|
case 35: goto tr8;
|
185
185
|
}
|
186
186
|
goto st0;
|
187
187
|
tr7:
|
188
|
-
#line 82 "
|
188
|
+
#line 82 "unicorn_http.rl"
|
189
189
|
{
|
190
190
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
191
191
|
}
|
192
192
|
goto st5;
|
193
193
|
tr30:
|
194
|
-
#line 64 "
|
194
|
+
#line 64 "unicorn_http.rl"
|
195
195
|
{MARK(mark, p); }
|
196
|
-
#line 85 "
|
196
|
+
#line 85 "unicorn_http.rl"
|
197
197
|
{
|
198
198
|
fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
199
199
|
}
|
200
200
|
goto st5;
|
201
201
|
tr33:
|
202
|
-
#line 85 "
|
202
|
+
#line 85 "unicorn_http.rl"
|
203
203
|
{
|
204
204
|
fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
205
205
|
}
|
206
206
|
goto st5;
|
207
207
|
tr37:
|
208
|
-
#line 98 "
|
208
|
+
#line 98 "unicorn_http.rl"
|
209
209
|
{
|
210
210
|
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
211
211
|
}
|
212
|
-
#line 82 "
|
212
|
+
#line 82 "unicorn_http.rl"
|
213
213
|
{
|
214
214
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
215
215
|
}
|
216
216
|
goto st5;
|
217
217
|
tr48:
|
218
|
-
#line 89 "
|
218
|
+
#line 89 "unicorn_http.rl"
|
219
219
|
{MARK(query_start, p); }
|
220
|
-
#line 90 "
|
220
|
+
#line 90 "unicorn_http.rl"
|
221
221
|
{
|
222
222
|
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
223
223
|
}
|
224
|
-
#line 82 "
|
224
|
+
#line 82 "unicorn_http.rl"
|
225
225
|
{
|
226
226
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
227
227
|
}
|
228
228
|
goto st5;
|
229
229
|
tr52:
|
230
|
-
#line 90 "
|
230
|
+
#line 90 "unicorn_http.rl"
|
231
231
|
{
|
232
232
|
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
233
233
|
}
|
234
|
-
#line 82 "
|
234
|
+
#line 82 "unicorn_http.rl"
|
235
235
|
{
|
236
236
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
237
237
|
}
|
@@ -240,19 +240,19 @@ st5:
|
|
240
240
|
if ( ++p == pe )
|
241
241
|
goto _test_eof5;
|
242
242
|
case 5:
|
243
|
-
#line 244 "
|
243
|
+
#line 244 "unicorn_http.h"
|
244
244
|
if ( (*p) == 72 )
|
245
245
|
goto tr9;
|
246
246
|
goto st0;
|
247
247
|
tr9:
|
248
|
-
#line 64 "
|
248
|
+
#line 64 "unicorn_http.rl"
|
249
249
|
{MARK(mark, p); }
|
250
250
|
goto st6;
|
251
251
|
st6:
|
252
252
|
if ( ++p == pe )
|
253
253
|
goto _test_eof6;
|
254
254
|
case 6:
|
255
|
-
#line 256 "
|
255
|
+
#line 256 "unicorn_http.h"
|
256
256
|
if ( (*p) == 84 )
|
257
257
|
goto st7;
|
258
258
|
goto st0;
|
@@ -310,21 +310,21 @@ case 13:
|
|
310
310
|
goto st13;
|
311
311
|
goto st0;
|
312
312
|
tr17:
|
313
|
-
#line 94 "
|
313
|
+
#line 94 "unicorn_http.rl"
|
314
314
|
{
|
315
315
|
http_version(parser->data, PTR_TO(mark), LEN(mark, p));
|
316
316
|
}
|
317
317
|
goto st14;
|
318
318
|
tr25:
|
319
|
-
#line 73 "
|
319
|
+
#line 73 "unicorn_http.rl"
|
320
320
|
{ MARK(mark, p); }
|
321
|
-
#line 74 "
|
321
|
+
#line 74 "unicorn_http.rl"
|
322
322
|
{
|
323
323
|
http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
324
324
|
}
|
325
325
|
goto st14;
|
326
326
|
tr28:
|
327
|
-
#line 74 "
|
327
|
+
#line 74 "unicorn_http.rl"
|
328
328
|
{
|
329
329
|
http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
330
330
|
}
|
@@ -333,7 +333,7 @@ st14:
|
|
333
333
|
if ( ++p == pe )
|
334
334
|
goto _test_eof14;
|
335
335
|
case 14:
|
336
|
-
#line 337 "
|
336
|
+
#line 337 "unicorn_http.h"
|
337
337
|
if ( (*p) == 10 )
|
338
338
|
goto st15;
|
339
339
|
goto st0;
|
@@ -373,7 +373,7 @@ case 16:
|
|
373
373
|
goto tr21;
|
374
374
|
goto st0;
|
375
375
|
tr21:
|
376
|
-
#line 102 "
|
376
|
+
#line 102 "unicorn_http.rl"
|
377
377
|
{
|
378
378
|
parser->body_start = p - buffer + 1;
|
379
379
|
header_done(parser->data, p + 1, pe - p - 1);
|
@@ -384,23 +384,23 @@ st63:
|
|
384
384
|
if ( ++p == pe )
|
385
385
|
goto _test_eof63;
|
386
386
|
case 63:
|
387
|
-
#line 388 "
|
387
|
+
#line 388 "unicorn_http.h"
|
388
388
|
goto st0;
|
389
389
|
tr20:
|
390
|
-
#line 66 "
|
390
|
+
#line 66 "unicorn_http.rl"
|
391
391
|
{ MARK(field_start, p); }
|
392
|
-
#line 67 "
|
392
|
+
#line 67 "unicorn_http.rl"
|
393
393
|
{ snake_upcase_char((char *)p); }
|
394
394
|
goto st17;
|
395
395
|
tr22:
|
396
|
-
#line 67 "
|
396
|
+
#line 67 "unicorn_http.rl"
|
397
397
|
{ snake_upcase_char((char *)p); }
|
398
398
|
goto st17;
|
399
399
|
st17:
|
400
400
|
if ( ++p == pe )
|
401
401
|
goto _test_eof17;
|
402
402
|
case 17:
|
403
|
-
#line 404 "
|
403
|
+
#line 404 "unicorn_http.h"
|
404
404
|
switch( (*p) ) {
|
405
405
|
case 33: goto tr22;
|
406
406
|
case 58: goto tr23;
|
@@ -426,71 +426,71 @@ case 17:
|
|
426
426
|
goto tr22;
|
427
427
|
goto st0;
|
428
428
|
tr23:
|
429
|
-
#line 69 "
|
429
|
+
#line 69 "unicorn_http.rl"
|
430
430
|
{
|
431
431
|
parser->field_len = LEN(field_start, p);
|
432
432
|
}
|
433
433
|
goto st18;
|
434
434
|
tr26:
|
435
|
-
#line 73 "
|
435
|
+
#line 73 "unicorn_http.rl"
|
436
436
|
{ MARK(mark, p); }
|
437
437
|
goto st18;
|
438
438
|
st18:
|
439
439
|
if ( ++p == pe )
|
440
440
|
goto _test_eof18;
|
441
441
|
case 18:
|
442
|
-
#line 443 "
|
442
|
+
#line 443 "unicorn_http.h"
|
443
443
|
switch( (*p) ) {
|
444
444
|
case 13: goto tr25;
|
445
445
|
case 32: goto tr26;
|
446
446
|
}
|
447
447
|
goto tr24;
|
448
448
|
tr24:
|
449
|
-
#line 73 "
|
449
|
+
#line 73 "unicorn_http.rl"
|
450
450
|
{ MARK(mark, p); }
|
451
451
|
goto st19;
|
452
452
|
st19:
|
453
453
|
if ( ++p == pe )
|
454
454
|
goto _test_eof19;
|
455
455
|
case 19:
|
456
|
-
#line 457 "
|
456
|
+
#line 457 "unicorn_http.h"
|
457
457
|
if ( (*p) == 13 )
|
458
458
|
goto tr28;
|
459
459
|
goto st19;
|
460
460
|
tr8:
|
461
|
-
#line 82 "
|
461
|
+
#line 82 "unicorn_http.rl"
|
462
462
|
{
|
463
463
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
464
464
|
}
|
465
465
|
goto st20;
|
466
466
|
tr38:
|
467
|
-
#line 98 "
|
467
|
+
#line 98 "unicorn_http.rl"
|
468
468
|
{
|
469
469
|
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
470
470
|
}
|
471
|
-
#line 82 "
|
471
|
+
#line 82 "unicorn_http.rl"
|
472
472
|
{
|
473
473
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
474
474
|
}
|
475
475
|
goto st20;
|
476
476
|
tr49:
|
477
|
-
#line 89 "
|
477
|
+
#line 89 "unicorn_http.rl"
|
478
478
|
{MARK(query_start, p); }
|
479
|
-
#line 90 "
|
479
|
+
#line 90 "unicorn_http.rl"
|
480
480
|
{
|
481
481
|
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
482
482
|
}
|
483
|
-
#line 82 "
|
483
|
+
#line 82 "unicorn_http.rl"
|
484
484
|
{
|
485
485
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
486
486
|
}
|
487
487
|
goto st20;
|
488
488
|
tr53:
|
489
|
-
#line 90 "
|
489
|
+
#line 90 "unicorn_http.rl"
|
490
490
|
{
|
491
491
|
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
492
492
|
}
|
493
|
-
#line 82 "
|
493
|
+
#line 82 "unicorn_http.rl"
|
494
494
|
{
|
495
495
|
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
496
496
|
}
|
@@ -499,7 +499,7 @@ st20:
|
|
499
499
|
if ( ++p == pe )
|
500
500
|
goto _test_eof20;
|
501
501
|
case 20:
|
502
|
-
#line 503 "
|
502
|
+
#line 503 "unicorn_http.h"
|
503
503
|
switch( (*p) ) {
|
504
504
|
case 32: goto tr30;
|
505
505
|
case 35: goto st0;
|
@@ -510,14 +510,14 @@ case 20:
|
|
510
510
|
goto st0;
|
511
511
|
goto tr29;
|
512
512
|
tr29:
|
513
|
-
#line 64 "
|
513
|
+
#line 64 "unicorn_http.rl"
|
514
514
|
{MARK(mark, p); }
|
515
515
|
goto st21;
|
516
516
|
st21:
|
517
517
|
if ( ++p == pe )
|
518
518
|
goto _test_eof21;
|
519
519
|
case 21:
|
520
|
-
#line 521 "
|
520
|
+
#line 521 "unicorn_http.h"
|
521
521
|
switch( (*p) ) {
|
522
522
|
case 32: goto tr33;
|
523
523
|
case 35: goto st0;
|
@@ -528,14 +528,14 @@ case 21:
|
|
528
528
|
goto st0;
|
529
529
|
goto st21;
|
530
530
|
tr31:
|
531
|
-
#line 64 "
|
531
|
+
#line 64 "unicorn_http.rl"
|
532
532
|
{MARK(mark, p); }
|
533
533
|
goto st22;
|
534
534
|
st22:
|
535
535
|
if ( ++p == pe )
|
536
536
|
goto _test_eof22;
|
537
537
|
case 22:
|
538
|
-
#line 539 "
|
538
|
+
#line 539 "unicorn_http.h"
|
539
539
|
if ( (*p) < 65 ) {
|
540
540
|
if ( 48 <= (*p) && (*p) <= 57 )
|
541
541
|
goto st23;
|
@@ -559,20 +559,20 @@ case 23:
|
|
559
559
|
goto st21;
|
560
560
|
goto st0;
|
561
561
|
tr5:
|
562
|
-
#line 64 "
|
562
|
+
#line 64 "unicorn_http.rl"
|
563
563
|
{MARK(mark, p); }
|
564
564
|
goto st24;
|
565
565
|
tr65:
|
566
|
-
#line 81 "
|
566
|
+
#line 81 "unicorn_http.rl"
|
567
567
|
{ host(parser->data, PTR_TO(mark), LEN(mark, p)); }
|
568
|
-
#line 64 "
|
568
|
+
#line 64 "unicorn_http.rl"
|
569
569
|
{MARK(mark, p); }
|
570
570
|
goto st24;
|
571
571
|
st24:
|
572
572
|
if ( ++p == pe )
|
573
573
|
goto _test_eof24;
|
574
574
|
case 24:
|
575
|
-
#line 576 "
|
575
|
+
#line 576 "unicorn_http.h"
|
576
576
|
switch( (*p) ) {
|
577
577
|
case 32: goto tr37;
|
578
578
|
case 35: goto tr38;
|
@@ -611,7 +611,7 @@ case 26:
|
|
611
611
|
goto st24;
|
612
612
|
goto st0;
|
613
613
|
tr40:
|
614
|
-
#line 98 "
|
614
|
+
#line 98 "unicorn_http.rl"
|
615
615
|
{
|
616
616
|
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
617
617
|
}
|
@@ -620,7 +620,7 @@ st27:
|
|
620
620
|
if ( ++p == pe )
|
621
621
|
goto _test_eof27;
|
622
622
|
case 27:
|
623
|
-
#line 624 "
|
623
|
+
#line 624 "unicorn_http.h"
|
624
624
|
switch( (*p) ) {
|
625
625
|
case 32: goto tr7;
|
626
626
|
case 35: goto tr8;
|
@@ -658,7 +658,7 @@ case 29:
|
|
658
658
|
goto st27;
|
659
659
|
goto st0;
|
660
660
|
tr41:
|
661
|
-
#line 98 "
|
661
|
+
#line 98 "unicorn_http.rl"
|
662
662
|
{
|
663
663
|
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
664
664
|
}
|
@@ -667,7 +667,7 @@ st30:
|
|
667
667
|
if ( ++p == pe )
|
668
668
|
goto _test_eof30;
|
669
669
|
case 30:
|
670
|
-
#line 671 "
|
670
|
+
#line 671 "unicorn_http.h"
|
671
671
|
switch( (*p) ) {
|
672
672
|
case 32: goto tr48;
|
673
673
|
case 35: goto tr49;
|
@@ -678,14 +678,14 @@ case 30:
|
|
678
678
|
goto st0;
|
679
679
|
goto tr47;
|
680
680
|
tr47:
|
681
|
-
#line 89 "
|
681
|
+
#line 89 "unicorn_http.rl"
|
682
682
|
{MARK(query_start, p); }
|
683
683
|
goto st31;
|
684
684
|
st31:
|
685
685
|
if ( ++p == pe )
|
686
686
|
goto _test_eof31;
|
687
687
|
case 31:
|
688
|
-
#line 689 "
|
688
|
+
#line 689 "unicorn_http.h"
|
689
689
|
switch( (*p) ) {
|
690
690
|
case 32: goto tr52;
|
691
691
|
case 35: goto tr53;
|
@@ -696,14 +696,14 @@ case 31:
|
|
696
696
|
goto st0;
|
697
697
|
goto st31;
|
698
698
|
tr50:
|
699
|
-
#line 89 "
|
699
|
+
#line 89 "unicorn_http.rl"
|
700
700
|
{MARK(query_start, p); }
|
701
701
|
goto st32;
|
702
702
|
st32:
|
703
703
|
if ( ++p == pe )
|
704
704
|
goto _test_eof32;
|
705
705
|
case 32:
|
706
|
-
#line 707 "
|
706
|
+
#line 707 "unicorn_http.h"
|
707
707
|
if ( (*p) < 65 ) {
|
708
708
|
if ( 48 <= (*p) && (*p) <= 57 )
|
709
709
|
goto st33;
|
@@ -727,58 +727,58 @@ case 33:
|
|
727
727
|
goto st31;
|
728
728
|
goto st0;
|
729
729
|
tr6:
|
730
|
-
#line 64 "
|
730
|
+
#line 64 "unicorn_http.rl"
|
731
731
|
{MARK(mark, p); }
|
732
|
-
#line 68 "
|
732
|
+
#line 68 "unicorn_http.rl"
|
733
733
|
{ downcase_char((char *)p); }
|
734
734
|
goto st34;
|
735
735
|
st34:
|
736
736
|
if ( ++p == pe )
|
737
737
|
goto _test_eof34;
|
738
738
|
case 34:
|
739
|
-
#line 740 "
|
739
|
+
#line 740 "unicorn_http.h"
|
740
740
|
switch( (*p) ) {
|
741
741
|
case 84: goto tr56;
|
742
742
|
case 116: goto tr56;
|
743
743
|
}
|
744
744
|
goto st0;
|
745
745
|
tr56:
|
746
|
-
#line 68 "
|
746
|
+
#line 68 "unicorn_http.rl"
|
747
747
|
{ downcase_char((char *)p); }
|
748
748
|
goto st35;
|
749
749
|
st35:
|
750
750
|
if ( ++p == pe )
|
751
751
|
goto _test_eof35;
|
752
752
|
case 35:
|
753
|
-
#line 754 "
|
753
|
+
#line 754 "unicorn_http.h"
|
754
754
|
switch( (*p) ) {
|
755
755
|
case 84: goto tr57;
|
756
756
|
case 116: goto tr57;
|
757
757
|
}
|
758
758
|
goto st0;
|
759
759
|
tr57:
|
760
|
-
#line 68 "
|
760
|
+
#line 68 "unicorn_http.rl"
|
761
761
|
{ downcase_char((char *)p); }
|
762
762
|
goto st36;
|
763
763
|
st36:
|
764
764
|
if ( ++p == pe )
|
765
765
|
goto _test_eof36;
|
766
766
|
case 36:
|
767
|
-
#line 768 "
|
767
|
+
#line 768 "unicorn_http.h"
|
768
768
|
switch( (*p) ) {
|
769
769
|
case 80: goto tr58;
|
770
770
|
case 112: goto tr58;
|
771
771
|
}
|
772
772
|
goto st0;
|
773
773
|
tr58:
|
774
|
-
#line 68 "
|
774
|
+
#line 68 "unicorn_http.rl"
|
775
775
|
{ downcase_char((char *)p); }
|
776
776
|
goto st37;
|
777
777
|
st37:
|
778
778
|
if ( ++p == pe )
|
779
779
|
goto _test_eof37;
|
780
780
|
case 37:
|
781
|
-
#line 782 "
|
781
|
+
#line 782 "unicorn_http.h"
|
782
782
|
switch( (*p) ) {
|
783
783
|
case 58: goto tr59;
|
784
784
|
case 83: goto tr60;
|
@@ -786,14 +786,14 @@ case 37:
|
|
786
786
|
}
|
787
787
|
goto st0;
|
788
788
|
tr59:
|
789
|
-
#line 80 "
|
789
|
+
#line 80 "unicorn_http.rl"
|
790
790
|
{ scheme(parser->data, PTR_TO(mark), LEN(mark, p)); }
|
791
791
|
goto st38;
|
792
792
|
st38:
|
793
793
|
if ( ++p == pe )
|
794
794
|
goto _test_eof38;
|
795
795
|
case 38:
|
796
|
-
#line 797 "
|
796
|
+
#line 797 "unicorn_http.h"
|
797
797
|
if ( (*p) == 47 )
|
798
798
|
goto st39;
|
799
799
|
goto st0;
|
@@ -823,14 +823,14 @@ case 40:
|
|
823
823
|
goto tr63;
|
824
824
|
goto st0;
|
825
825
|
tr63:
|
826
|
-
#line 64 "
|
826
|
+
#line 64 "unicorn_http.rl"
|
827
827
|
{MARK(mark, p); }
|
828
828
|
goto st41;
|
829
829
|
st41:
|
830
830
|
if ( ++p == pe )
|
831
831
|
goto _test_eof41;
|
832
832
|
case 41:
|
833
|
-
#line 834 "
|
833
|
+
#line 834 "unicorn_http.h"
|
834
834
|
switch( (*p) ) {
|
835
835
|
case 47: goto tr65;
|
836
836
|
case 58: goto st42;
|
@@ -855,14 +855,14 @@ case 42:
|
|
855
855
|
goto st42;
|
856
856
|
goto st0;
|
857
857
|
tr60:
|
858
|
-
#line 68 "
|
858
|
+
#line 68 "unicorn_http.rl"
|
859
859
|
{ downcase_char((char *)p); }
|
860
860
|
goto st43;
|
861
861
|
st43:
|
862
862
|
if ( ++p == pe )
|
863
863
|
goto _test_eof43;
|
864
864
|
case 43:
|
865
|
-
#line 866 "
|
865
|
+
#line 866 "unicorn_http.h"
|
866
866
|
if ( (*p) == 58 )
|
867
867
|
goto tr59;
|
868
868
|
goto st0;
|
@@ -1265,7 +1265,7 @@ case 62:
|
|
1265
1265
|
_out: {}
|
1266
1266
|
}
|
1267
1267
|
|
1268
|
-
#line 138 "
|
1268
|
+
#line 138 "unicorn_http.rl"
|
1269
1269
|
|
1270
1270
|
if (!http_parser_has_error(parser))
|
1271
1271
|
parser->cs = cs;
|
@@ -1286,4 +1286,4 @@ static int http_parser_has_error(http_parser *parser) {
|
|
1286
1286
|
static int http_parser_is_finished(http_parser *parser) {
|
1287
1287
|
return parser->cs == http_parser_first_final;
|
1288
1288
|
}
|
1289
|
-
#endif /*
|
1289
|
+
#endif /* unicorn_http_h */
|