unicorn 0.9.2 → 0.90.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGELOG +3 -0
- data/GNUmakefile +7 -7
- data/Manifest +20 -23
- data/README +16 -13
- data/TODO +5 -3
- data/bin/unicorn +1 -1
- data/bin/unicorn_rails +1 -1
- data/ext/unicorn_http/c_util.h +107 -0
- data/ext/unicorn_http/common_field_optimization.h +110 -0
- data/ext/unicorn_http/ext_help.h +41 -5
- data/ext/unicorn_http/extconf.rb +3 -1
- data/ext/unicorn_http/global_variables.h +93 -0
- data/ext/unicorn_http/unicorn_http.c +2123 -326
- data/ext/unicorn_http/unicorn_http.rl +488 -87
- data/ext/unicorn_http/unicorn_http_common.rl +12 -1
- data/lib/unicorn.rb +0 -2
- data/lib/unicorn/app/exec_cgi.rb +0 -1
- data/lib/unicorn/app/inetd.rb +2 -0
- data/lib/unicorn/app/old_rails/static.rb +0 -2
- data/lib/unicorn/const.rb +1 -5
- data/lib/unicorn/http_request.rb +13 -29
- data/lib/unicorn/http_response.rb +1 -1
- data/lib/unicorn/tee_input.rb +48 -46
- data/lib/unicorn/util.rb +3 -3
- data/test/benchmark/README +0 -5
- data/test/exec/test_exec.rb +4 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/.gitignore +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/Rakefile +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/app/controllers/application_controller.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/app/controllers/foo_controller.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/app/helpers/application_helper.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/boot.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/database.yml +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/environment.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/environments/development.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/environments/production.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/config/routes.rb +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/db/.gitignore +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/public/404.html +0 -0
- data/test/rails/{app-2.3.2.1 → app-2.3.3.1}/public/500.html +0 -0
- data/test/unit/test_http_parser.rb +112 -47
- data/test/unit/test_http_parser_ng.rb +284 -0
- data/test/unit/test_request.rb +25 -7
- data/test/unit/test_response.rb +11 -0
- data/test/unit/test_server.rb +7 -2
- data/test/unit/test_signals.rb +2 -0
- data/test/unit/test_tee_input.rb +118 -2
- data/test/unit/test_upload.rb +1 -1
- data/test/unit/test_util.rb +5 -0
- data/unicorn.gemspec +6 -6
- metadata +33 -37
- data/ext/unicorn_http/unicorn_http.h +0 -1289
- data/lib/unicorn/chunked_reader.rb +0 -77
- data/lib/unicorn/trailer_parser.rb +0 -52
- data/test/benchmark/big_request.rb +0 -44
- data/test/benchmark/request.rb +0 -56
- data/test/benchmark/response.rb +0 -30
- data/test/unit/test_chunked_reader.rb +0 -123
- data/test/unit/test_trailer_parser.rb +0 -52
data/test/unit/test_upload.rb
CHANGED
@@ -87,7 +87,7 @@ class UploadTest < Test::Unit::TestCase
|
|
87
87
|
sock.syswrite("0\r\n")
|
88
88
|
|
89
89
|
content_md5 = [ md5.digest! ].pack('m').strip.freeze
|
90
|
-
sock.syswrite("Content-MD5: #{content_md5}\r\n")
|
90
|
+
sock.syswrite("Content-MD5: #{content_md5}\r\n\r\n")
|
91
91
|
read = sock.read.split(/\r\n/)
|
92
92
|
assert_equal "HTTP/1.1 200 OK", read[0]
|
93
93
|
resp = eval(read.grep(/^X-Resp: /).first.sub!(/X-Resp: /, ''))
|
data/test/unit/test_util.rb
CHANGED
@@ -15,6 +15,7 @@ class TestUtil < Test::Unit::TestCase
|
|
15
15
|
assert_equal before, File.stat(tmp.path).inspect
|
16
16
|
assert_equal ext, (tmp.external_encoding rescue nil)
|
17
17
|
assert_equal int, (tmp.internal_encoding rescue nil)
|
18
|
+
assert_nothing_raised { tmp.close! }
|
18
19
|
end
|
19
20
|
|
20
21
|
def test_reopen_logs_renamed
|
@@ -37,6 +38,8 @@ class TestUtil < Test::Unit::TestCase
|
|
37
38
|
assert_equal int, (tmp.internal_encoding rescue nil)
|
38
39
|
assert_equal(EXPECT_FLAGS, EXPECT_FLAGS & tmp.fcntl(Fcntl::F_GETFL))
|
39
40
|
assert tmp.sync
|
41
|
+
assert_nothing_raised { tmp.close! }
|
42
|
+
assert_nothing_raised { to.close! }
|
40
43
|
end
|
41
44
|
|
42
45
|
def test_reopen_logs_renamed_with_encoding
|
@@ -59,6 +62,7 @@ class TestUtil < Test::Unit::TestCase
|
|
59
62
|
assert fp.sync
|
60
63
|
}
|
61
64
|
}
|
65
|
+
assert_nothing_raised { tmp.close! }
|
62
66
|
end if STDIN.respond_to?(:external_encoding)
|
63
67
|
|
64
68
|
def test_reopen_logs_renamed_with_internal_encoding
|
@@ -84,6 +88,7 @@ class TestUtil < Test::Unit::TestCase
|
|
84
88
|
}
|
85
89
|
}
|
86
90
|
}
|
91
|
+
assert_nothing_raised { tmp.close! }
|
87
92
|
end if STDIN.respond_to?(:external_encoding)
|
88
93
|
|
89
94
|
end
|
data/unicorn.gemspec
CHANGED
@@ -2,24 +2,24 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{unicorn}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.90.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Eric Wong"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-08-16}
|
10
10
|
s.description = %q{Rack HTTP server for Unix, fast clients and nothing else}
|
11
11
|
s.email = %q{normalperson@yhbt.net}
|
12
12
|
s.executables = ["unicorn", "unicorn_rails"]
|
13
13
|
s.extensions = ["ext/unicorn_http/extconf.rb"]
|
14
|
-
s.extra_rdoc_files = ["CHANGELOG", "COPYING", "LICENSE", "README", "TODO", "bin/unicorn", "bin/unicorn_rails", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/
|
15
|
-
s.files = [".document", ".gitignore", "CHANGELOG", "CONTRIBUTORS", "COPYING", "DESIGN", "GNUmakefile", "LICENSE", "Manifest", "PHILOSOPHY", "README", "Rakefile", "SIGNALS", "TODO", "TUNING", "bin/unicorn", "bin/unicorn_rails", "examples/echo.ru", "examples/git.ru", "examples/init.sh", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/
|
14
|
+
s.extra_rdoc_files = ["CHANGELOG", "COPYING", "LICENSE", "README", "TODO", "bin/unicorn", "bin/unicorn_rails", "ext/unicorn_http/c_util.h", "ext/unicorn_http/common_field_optimization.h", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/global_variables.h", "ext/unicorn_http/unicorn_http.c", "ext/unicorn_http/unicorn_http.rl", "ext/unicorn_http/unicorn_http_common.rl", "lib/unicorn.rb", "lib/unicorn/app/exec_cgi.rb", "lib/unicorn/app/inetd.rb", "lib/unicorn/app/old_rails.rb", "lib/unicorn/app/old_rails/static.rb", "lib/unicorn/cgi_wrapper.rb", "lib/unicorn/configurator.rb", "lib/unicorn/const.rb", "lib/unicorn/http_request.rb", "lib/unicorn/http_response.rb", "lib/unicorn/launcher.rb", "lib/unicorn/socket_helper.rb", "lib/unicorn/tee_input.rb", "lib/unicorn/util.rb"]
|
15
|
+
s.files = [".document", ".gitignore", "CHANGELOG", "CONTRIBUTORS", "COPYING", "DESIGN", "GNUmakefile", "LICENSE", "Manifest", "PHILOSOPHY", "README", "Rakefile", "SIGNALS", "TODO", "TUNING", "bin/unicorn", "bin/unicorn_rails", "examples/echo.ru", "examples/git.ru", "examples/init.sh", "ext/unicorn_http/c_util.h", "ext/unicorn_http/common_field_optimization.h", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/global_variables.h", "ext/unicorn_http/unicorn_http.c", "ext/unicorn_http/unicorn_http.rl", "ext/unicorn_http/unicorn_http_common.rl", "lib/unicorn.rb", "lib/unicorn/app/exec_cgi.rb", "lib/unicorn/app/inetd.rb", "lib/unicorn/app/old_rails.rb", "lib/unicorn/app/old_rails/static.rb", "lib/unicorn/cgi_wrapper.rb", "lib/unicorn/configurator.rb", "lib/unicorn/const.rb", "lib/unicorn/http_request.rb", "lib/unicorn/http_response.rb", "lib/unicorn/launcher.rb", "lib/unicorn/socket_helper.rb", "lib/unicorn/tee_input.rb", "lib/unicorn/util.rb", "local.mk.sample", "setup.rb", "test/aggregate.rb", "test/benchmark/README", "test/benchmark/dd.ru", "test/exec/README", "test/exec/test_exec.rb", "test/rails/app-1.2.3/.gitignore", "test/rails/app-1.2.3/Rakefile", "test/rails/app-1.2.3/app/controllers/application.rb", "test/rails/app-1.2.3/app/controllers/foo_controller.rb", "test/rails/app-1.2.3/app/helpers/application_helper.rb", "test/rails/app-1.2.3/config/boot.rb", "test/rails/app-1.2.3/config/database.yml", "test/rails/app-1.2.3/config/environment.rb", "test/rails/app-1.2.3/config/environments/development.rb", "test/rails/app-1.2.3/config/environments/production.rb", "test/rails/app-1.2.3/config/routes.rb", "test/rails/app-1.2.3/db/.gitignore", "test/rails/app-1.2.3/log/.gitignore", "test/rails/app-1.2.3/public/404.html", "test/rails/app-1.2.3/public/500.html", "test/rails/app-2.0.2/.gitignore", "test/rails/app-2.0.2/Rakefile", "test/rails/app-2.0.2/app/controllers/application.rb", "test/rails/app-2.0.2/app/controllers/foo_controller.rb", "test/rails/app-2.0.2/app/helpers/application_helper.rb", "test/rails/app-2.0.2/config/boot.rb", "test/rails/app-2.0.2/config/database.yml", "test/rails/app-2.0.2/config/environment.rb", "test/rails/app-2.0.2/config/environments/development.rb", "test/rails/app-2.0.2/config/environments/production.rb", "test/rails/app-2.0.2/config/routes.rb", "test/rails/app-2.0.2/db/.gitignore", "test/rails/app-2.0.2/log/.gitignore", "test/rails/app-2.0.2/public/404.html", "test/rails/app-2.0.2/public/500.html", "test/rails/app-2.1.2/.gitignore", "test/rails/app-2.1.2/Rakefile", "test/rails/app-2.1.2/app/controllers/application.rb", "test/rails/app-2.1.2/app/controllers/foo_controller.rb", "test/rails/app-2.1.2/app/helpers/application_helper.rb", "test/rails/app-2.1.2/config/boot.rb", "test/rails/app-2.1.2/config/database.yml", "test/rails/app-2.1.2/config/environment.rb", "test/rails/app-2.1.2/config/environments/development.rb", "test/rails/app-2.1.2/config/environments/production.rb", "test/rails/app-2.1.2/config/routes.rb", "test/rails/app-2.1.2/db/.gitignore", "test/rails/app-2.1.2/log/.gitignore", "test/rails/app-2.1.2/public/404.html", "test/rails/app-2.1.2/public/500.html", "test/rails/app-2.2.2/.gitignore", "test/rails/app-2.2.2/Rakefile", "test/rails/app-2.2.2/app/controllers/application.rb", "test/rails/app-2.2.2/app/controllers/foo_controller.rb", "test/rails/app-2.2.2/app/helpers/application_helper.rb", "test/rails/app-2.2.2/config/boot.rb", "test/rails/app-2.2.2/config/database.yml", "test/rails/app-2.2.2/config/environment.rb", "test/rails/app-2.2.2/config/environments/development.rb", "test/rails/app-2.2.2/config/environments/production.rb", "test/rails/app-2.2.2/config/routes.rb", "test/rails/app-2.2.2/db/.gitignore", "test/rails/app-2.2.2/log/.gitignore", "test/rails/app-2.2.2/public/404.html", "test/rails/app-2.2.2/public/500.html", "test/rails/app-2.3.3.1/.gitignore", "test/rails/app-2.3.3.1/Rakefile", "test/rails/app-2.3.3.1/app/controllers/application_controller.rb", "test/rails/app-2.3.3.1/app/controllers/foo_controller.rb", "test/rails/app-2.3.3.1/app/helpers/application_helper.rb", "test/rails/app-2.3.3.1/config/boot.rb", "test/rails/app-2.3.3.1/config/database.yml", "test/rails/app-2.3.3.1/config/environment.rb", "test/rails/app-2.3.3.1/config/environments/development.rb", "test/rails/app-2.3.3.1/config/environments/production.rb", "test/rails/app-2.3.3.1/config/routes.rb", "test/rails/app-2.3.3.1/db/.gitignore", "test/rails/app-2.3.3.1/log/.gitignore", "test/rails/app-2.3.3.1/public/404.html", "test/rails/app-2.3.3.1/public/500.html", "test/rails/test_rails.rb", "test/test_helper.rb", "test/unit/test_configurator.rb", "test/unit/test_http_parser.rb", "test/unit/test_http_parser_ng.rb", "test/unit/test_request.rb", "test/unit/test_response.rb", "test/unit/test_server.rb", "test/unit/test_signals.rb", "test/unit/test_socket_helper.rb", "test/unit/test_tee_input.rb", "test/unit/test_upload.rb", "test/unit/test_util.rb", "unicorn.gemspec"]
|
16
16
|
s.homepage = %q{http://unicorn.bogomips.org/}
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Unicorn", "--main", "README"]
|
18
18
|
s.require_paths = ["lib", "ext"]
|
19
19
|
s.rubyforge_project = %q{unicorn}
|
20
|
-
s.rubygems_version = %q{1.3.
|
20
|
+
s.rubygems_version = %q{1.3.5}
|
21
21
|
s.summary = %q{Rack HTTP server for Unix, fast clients and nothing else}
|
22
|
-
s.test_files = ["test/unit/
|
22
|
+
s.test_files = ["test/unit/test_configurator.rb", "test/unit/test_response.rb", "test/unit/test_request.rb", "test/unit/test_signals.rb", "test/unit/test_tee_input.rb", "test/unit/test_upload.rb", "test/unit/test_http_parser.rb", "test/unit/test_http_parser_ng.rb", "test/unit/test_socket_helper.rb", "test/unit/test_util.rb", "test/unit/test_server.rb"]
|
23
23
|
|
24
24
|
if s.respond_to? :specification_version then
|
25
25
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.90.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Wong
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-16 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -37,10 +37,12 @@ extra_rdoc_files:
|
|
37
37
|
- TODO
|
38
38
|
- bin/unicorn
|
39
39
|
- bin/unicorn_rails
|
40
|
+
- ext/unicorn_http/c_util.h
|
41
|
+
- ext/unicorn_http/common_field_optimization.h
|
40
42
|
- ext/unicorn_http/ext_help.h
|
41
43
|
- ext/unicorn_http/extconf.rb
|
44
|
+
- ext/unicorn_http/global_variables.h
|
42
45
|
- ext/unicorn_http/unicorn_http.c
|
43
|
-
- ext/unicorn_http/unicorn_http.h
|
44
46
|
- ext/unicorn_http/unicorn_http.rl
|
45
47
|
- ext/unicorn_http/unicorn_http_common.rl
|
46
48
|
- lib/unicorn.rb
|
@@ -49,7 +51,6 @@ extra_rdoc_files:
|
|
49
51
|
- lib/unicorn/app/old_rails.rb
|
50
52
|
- lib/unicorn/app/old_rails/static.rb
|
51
53
|
- lib/unicorn/cgi_wrapper.rb
|
52
|
-
- lib/unicorn/chunked_reader.rb
|
53
54
|
- lib/unicorn/configurator.rb
|
54
55
|
- lib/unicorn/const.rb
|
55
56
|
- lib/unicorn/http_request.rb
|
@@ -57,7 +58,6 @@ extra_rdoc_files:
|
|
57
58
|
- lib/unicorn/launcher.rb
|
58
59
|
- lib/unicorn/socket_helper.rb
|
59
60
|
- lib/unicorn/tee_input.rb
|
60
|
-
- lib/unicorn/trailer_parser.rb
|
61
61
|
- lib/unicorn/util.rb
|
62
62
|
files:
|
63
63
|
- .document
|
@@ -80,10 +80,12 @@ files:
|
|
80
80
|
- examples/echo.ru
|
81
81
|
- examples/git.ru
|
82
82
|
- examples/init.sh
|
83
|
+
- ext/unicorn_http/c_util.h
|
84
|
+
- ext/unicorn_http/common_field_optimization.h
|
83
85
|
- ext/unicorn_http/ext_help.h
|
84
86
|
- ext/unicorn_http/extconf.rb
|
87
|
+
- ext/unicorn_http/global_variables.h
|
85
88
|
- ext/unicorn_http/unicorn_http.c
|
86
|
-
- ext/unicorn_http/unicorn_http.h
|
87
89
|
- ext/unicorn_http/unicorn_http.rl
|
88
90
|
- ext/unicorn_http/unicorn_http_common.rl
|
89
91
|
- lib/unicorn.rb
|
@@ -92,7 +94,6 @@ files:
|
|
92
94
|
- lib/unicorn/app/old_rails.rb
|
93
95
|
- lib/unicorn/app/old_rails/static.rb
|
94
96
|
- lib/unicorn/cgi_wrapper.rb
|
95
|
-
- lib/unicorn/chunked_reader.rb
|
96
97
|
- lib/unicorn/configurator.rb
|
97
98
|
- lib/unicorn/const.rb
|
98
99
|
- lib/unicorn/http_request.rb
|
@@ -100,16 +101,12 @@ files:
|
|
100
101
|
- lib/unicorn/launcher.rb
|
101
102
|
- lib/unicorn/socket_helper.rb
|
102
103
|
- lib/unicorn/tee_input.rb
|
103
|
-
- lib/unicorn/trailer_parser.rb
|
104
104
|
- lib/unicorn/util.rb
|
105
105
|
- local.mk.sample
|
106
106
|
- setup.rb
|
107
107
|
- test/aggregate.rb
|
108
108
|
- test/benchmark/README
|
109
|
-
- test/benchmark/big_request.rb
|
110
109
|
- test/benchmark/dd.ru
|
111
|
-
- test/benchmark/request.rb
|
112
|
-
- test/benchmark/response.rb
|
113
110
|
- test/exec/README
|
114
111
|
- test/exec/test_exec.rb
|
115
112
|
- test/rails/app-1.2.3/.gitignore
|
@@ -172,32 +169,32 @@ files:
|
|
172
169
|
- test/rails/app-2.2.2/log/.gitignore
|
173
170
|
- test/rails/app-2.2.2/public/404.html
|
174
171
|
- test/rails/app-2.2.2/public/500.html
|
175
|
-
- test/rails/app-2.3.
|
176
|
-
- test/rails/app-2.3.
|
177
|
-
- test/rails/app-2.3.
|
178
|
-
- test/rails/app-2.3.
|
179
|
-
- test/rails/app-2.3.
|
180
|
-
- test/rails/app-2.3.
|
181
|
-
- test/rails/app-2.3.
|
182
|
-
- test/rails/app-2.3.
|
183
|
-
- test/rails/app-2.3.
|
184
|
-
- test/rails/app-2.3.
|
185
|
-
- test/rails/app-2.3.
|
186
|
-
- test/rails/app-2.3.
|
187
|
-
- test/rails/app-2.3.
|
188
|
-
- test/rails/app-2.3.
|
189
|
-
- test/rails/app-2.3.
|
172
|
+
- test/rails/app-2.3.3.1/.gitignore
|
173
|
+
- test/rails/app-2.3.3.1/Rakefile
|
174
|
+
- test/rails/app-2.3.3.1/app/controllers/application_controller.rb
|
175
|
+
- test/rails/app-2.3.3.1/app/controllers/foo_controller.rb
|
176
|
+
- test/rails/app-2.3.3.1/app/helpers/application_helper.rb
|
177
|
+
- test/rails/app-2.3.3.1/config/boot.rb
|
178
|
+
- test/rails/app-2.3.3.1/config/database.yml
|
179
|
+
- test/rails/app-2.3.3.1/config/environment.rb
|
180
|
+
- test/rails/app-2.3.3.1/config/environments/development.rb
|
181
|
+
- test/rails/app-2.3.3.1/config/environments/production.rb
|
182
|
+
- test/rails/app-2.3.3.1/config/routes.rb
|
183
|
+
- test/rails/app-2.3.3.1/db/.gitignore
|
184
|
+
- test/rails/app-2.3.3.1/log/.gitignore
|
185
|
+
- test/rails/app-2.3.3.1/public/404.html
|
186
|
+
- test/rails/app-2.3.3.1/public/500.html
|
190
187
|
- test/rails/test_rails.rb
|
191
188
|
- test/test_helper.rb
|
192
|
-
- test/unit/test_chunked_reader.rb
|
193
189
|
- test/unit/test_configurator.rb
|
194
190
|
- test/unit/test_http_parser.rb
|
191
|
+
- test/unit/test_http_parser_ng.rb
|
195
192
|
- test/unit/test_request.rb
|
196
193
|
- test/unit/test_response.rb
|
197
194
|
- test/unit/test_server.rb
|
198
195
|
- test/unit/test_signals.rb
|
199
196
|
- test/unit/test_socket_helper.rb
|
200
|
-
- test/unit/
|
197
|
+
- test/unit/test_tee_input.rb
|
201
198
|
- test/unit/test_upload.rb
|
202
199
|
- test/unit/test_util.rb
|
203
200
|
- unicorn.gemspec
|
@@ -231,20 +228,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
228
|
requirements: []
|
232
229
|
|
233
230
|
rubyforge_project: unicorn
|
234
|
-
rubygems_version: 1.3.
|
231
|
+
rubygems_version: 1.3.5
|
235
232
|
signing_key:
|
236
233
|
specification_version: 3
|
237
234
|
summary: Rack HTTP server for Unix, fast clients and nothing else
|
238
235
|
test_files:
|
239
|
-
- test/unit/test_trailer_parser.rb
|
240
|
-
- test/unit/test_request.rb
|
241
|
-
- test/unit/test_http_parser.rb
|
242
|
-
- test/unit/test_chunked_reader.rb
|
243
|
-
- test/unit/test_server.rb
|
244
|
-
- test/unit/test_response.rb
|
245
236
|
- test/unit/test_configurator.rb
|
246
|
-
- test/unit/
|
247
|
-
- test/unit/
|
237
|
+
- test/unit/test_response.rb
|
238
|
+
- test/unit/test_request.rb
|
248
239
|
- test/unit/test_signals.rb
|
249
240
|
- test/unit/test_tee_input.rb
|
241
|
+
- test/unit/test_upload.rb
|
242
|
+
- test/unit/test_http_parser.rb
|
243
|
+
- test/unit/test_http_parser_ng.rb
|
250
244
|
- test/unit/test_socket_helper.rb
|
245
|
+
- test/unit/test_util.rb
|
246
|
+
- test/unit/test_server.rb
|
@@ -1,1289 +0,0 @@
|
|
1
|
-
|
2
|
-
#line 1 "unicorn_http.rl"
|
3
|
-
/**
|
4
|
-
* Copyright (c) 2005 Zed A. Shaw
|
5
|
-
* You can redistribute it and/or modify it under the same terms as Ruby.
|
6
|
-
*/
|
7
|
-
#ifndef unicorn_http_h
|
8
|
-
#define unicorn_http_h
|
9
|
-
|
10
|
-
#include <sys/types.h>
|
11
|
-
|
12
|
-
static void http_field(void *data, const char *field,
|
13
|
-
size_t flen, const char *value, size_t vlen);
|
14
|
-
static void request_method(void *data, const char *at, size_t length);
|
15
|
-
static void scheme(void *data, const char *at, size_t length);
|
16
|
-
static void host(void *data, const char *at, size_t length);
|
17
|
-
static void request_uri(void *data, const char *at, size_t length);
|
18
|
-
static void fragment(void *data, const char *at, size_t length);
|
19
|
-
static void request_path(void *data, const char *at, size_t length);
|
20
|
-
static void query_string(void *data, const char *at, size_t length);
|
21
|
-
static void http_version(void *data, const char *at, size_t length);
|
22
|
-
static void header_done(void *data, const char *at, size_t length);
|
23
|
-
|
24
|
-
typedef struct http_parser {
|
25
|
-
int cs;
|
26
|
-
size_t body_start;
|
27
|
-
size_t nread;
|
28
|
-
size_t mark;
|
29
|
-
size_t field_start;
|
30
|
-
size_t field_len;
|
31
|
-
size_t query_start;
|
32
|
-
|
33
|
-
void *data;
|
34
|
-
} http_parser;
|
35
|
-
|
36
|
-
static int http_parser_has_error(http_parser *parser);
|
37
|
-
static int http_parser_is_finished(http_parser *parser);
|
38
|
-
|
39
|
-
/*
|
40
|
-
* capitalizes all lower-case ASCII characters,
|
41
|
-
* converts dashes to underscores.
|
42
|
-
*/
|
43
|
-
static void snake_upcase_char(char *c)
|
44
|
-
{
|
45
|
-
if (*c >= 'a' && *c <= 'z')
|
46
|
-
*c &= ~0x20;
|
47
|
-
else if (*c == '-')
|
48
|
-
*c = '_';
|
49
|
-
}
|
50
|
-
|
51
|
-
static void downcase_char(char *c)
|
52
|
-
{
|
53
|
-
if (*c >= 'A' && *c <= 'Z')
|
54
|
-
*c |= 0x20;
|
55
|
-
}
|
56
|
-
|
57
|
-
#define LEN(AT, FPC) (FPC - buffer - parser->AT)
|
58
|
-
#define MARK(M,FPC) (parser->M = (FPC) - buffer)
|
59
|
-
#define PTR_TO(F) (buffer + parser->F)
|
60
|
-
|
61
|
-
/** Machine **/
|
62
|
-
|
63
|
-
|
64
|
-
#line 109 "unicorn_http.rl"
|
65
|
-
|
66
|
-
|
67
|
-
/** Data **/
|
68
|
-
|
69
|
-
#line 70 "unicorn_http.h"
|
70
|
-
static const int http_parser_start = 1;
|
71
|
-
static const int http_parser_first_final = 63;
|
72
|
-
static const int http_parser_error = 0;
|
73
|
-
|
74
|
-
static const int http_parser_en_main = 1;
|
75
|
-
|
76
|
-
|
77
|
-
#line 113 "unicorn_http.rl"
|
78
|
-
|
79
|
-
static void http_parser_init(http_parser *parser) {
|
80
|
-
int cs = 0;
|
81
|
-
memset(parser, 0, sizeof(*parser));
|
82
|
-
|
83
|
-
#line 84 "unicorn_http.h"
|
84
|
-
{
|
85
|
-
cs = http_parser_start;
|
86
|
-
}
|
87
|
-
|
88
|
-
#line 118 "unicorn_http.rl"
|
89
|
-
parser->cs = cs;
|
90
|
-
}
|
91
|
-
|
92
|
-
/** exec **/
|
93
|
-
static void http_parser_execute(
|
94
|
-
http_parser *parser, const char *buffer, size_t len)
|
95
|
-
{
|
96
|
-
const char *p, *pe;
|
97
|
-
int cs = parser->cs;
|
98
|
-
size_t off = parser->nread;
|
99
|
-
|
100
|
-
assert(off <= len && "offset past end of buffer");
|
101
|
-
|
102
|
-
p = buffer+off;
|
103
|
-
pe = buffer+len;
|
104
|
-
|
105
|
-
assert(*pe == '\0' && "pointer does not end on NUL");
|
106
|
-
assert(pe - p == len - off && "pointers aren't same distance");
|
107
|
-
|
108
|
-
|
109
|
-
#line 110 "unicorn_http.h"
|
110
|
-
{
|
111
|
-
if ( p == pe )
|
112
|
-
goto _test_eof;
|
113
|
-
switch ( cs )
|
114
|
-
{
|
115
|
-
case 1:
|
116
|
-
switch( (*p) ) {
|
117
|
-
case 36: goto tr0;
|
118
|
-
case 95: goto tr0;
|
119
|
-
}
|
120
|
-
if ( (*p) < 48 ) {
|
121
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
122
|
-
goto tr0;
|
123
|
-
} else if ( (*p) > 57 ) {
|
124
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
125
|
-
goto tr0;
|
126
|
-
} else
|
127
|
-
goto tr0;
|
128
|
-
goto st0;
|
129
|
-
st0:
|
130
|
-
cs = 0;
|
131
|
-
goto _out;
|
132
|
-
tr0:
|
133
|
-
#line 64 "unicorn_http.rl"
|
134
|
-
{MARK(mark, p); }
|
135
|
-
goto st2;
|
136
|
-
st2:
|
137
|
-
if ( ++p == pe )
|
138
|
-
goto _test_eof2;
|
139
|
-
case 2:
|
140
|
-
#line 141 "unicorn_http.h"
|
141
|
-
switch( (*p) ) {
|
142
|
-
case 32: goto tr2;
|
143
|
-
case 36: goto st44;
|
144
|
-
case 95: goto st44;
|
145
|
-
}
|
146
|
-
if ( (*p) < 48 ) {
|
147
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
148
|
-
goto st44;
|
149
|
-
} else if ( (*p) > 57 ) {
|
150
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
151
|
-
goto st44;
|
152
|
-
} else
|
153
|
-
goto st44;
|
154
|
-
goto st0;
|
155
|
-
tr2:
|
156
|
-
#line 77 "unicorn_http.rl"
|
157
|
-
{
|
158
|
-
request_method(parser->data, PTR_TO(mark), LEN(mark, p));
|
159
|
-
}
|
160
|
-
goto st3;
|
161
|
-
st3:
|
162
|
-
if ( ++p == pe )
|
163
|
-
goto _test_eof3;
|
164
|
-
case 3:
|
165
|
-
#line 166 "unicorn_http.h"
|
166
|
-
switch( (*p) ) {
|
167
|
-
case 42: goto tr4;
|
168
|
-
case 47: goto tr5;
|
169
|
-
case 72: goto tr6;
|
170
|
-
case 104: goto tr6;
|
171
|
-
}
|
172
|
-
goto st0;
|
173
|
-
tr4:
|
174
|
-
#line 64 "unicorn_http.rl"
|
175
|
-
{MARK(mark, p); }
|
176
|
-
goto st4;
|
177
|
-
st4:
|
178
|
-
if ( ++p == pe )
|
179
|
-
goto _test_eof4;
|
180
|
-
case 4:
|
181
|
-
#line 182 "unicorn_http.h"
|
182
|
-
switch( (*p) ) {
|
183
|
-
case 32: goto tr7;
|
184
|
-
case 35: goto tr8;
|
185
|
-
}
|
186
|
-
goto st0;
|
187
|
-
tr7:
|
188
|
-
#line 82 "unicorn_http.rl"
|
189
|
-
{
|
190
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
191
|
-
}
|
192
|
-
goto st5;
|
193
|
-
tr30:
|
194
|
-
#line 64 "unicorn_http.rl"
|
195
|
-
{MARK(mark, p); }
|
196
|
-
#line 85 "unicorn_http.rl"
|
197
|
-
{
|
198
|
-
fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
199
|
-
}
|
200
|
-
goto st5;
|
201
|
-
tr33:
|
202
|
-
#line 85 "unicorn_http.rl"
|
203
|
-
{
|
204
|
-
fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
205
|
-
}
|
206
|
-
goto st5;
|
207
|
-
tr37:
|
208
|
-
#line 98 "unicorn_http.rl"
|
209
|
-
{
|
210
|
-
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
211
|
-
}
|
212
|
-
#line 82 "unicorn_http.rl"
|
213
|
-
{
|
214
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
215
|
-
}
|
216
|
-
goto st5;
|
217
|
-
tr48:
|
218
|
-
#line 89 "unicorn_http.rl"
|
219
|
-
{MARK(query_start, p); }
|
220
|
-
#line 90 "unicorn_http.rl"
|
221
|
-
{
|
222
|
-
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
223
|
-
}
|
224
|
-
#line 82 "unicorn_http.rl"
|
225
|
-
{
|
226
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
227
|
-
}
|
228
|
-
goto st5;
|
229
|
-
tr52:
|
230
|
-
#line 90 "unicorn_http.rl"
|
231
|
-
{
|
232
|
-
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
233
|
-
}
|
234
|
-
#line 82 "unicorn_http.rl"
|
235
|
-
{
|
236
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
237
|
-
}
|
238
|
-
goto st5;
|
239
|
-
st5:
|
240
|
-
if ( ++p == pe )
|
241
|
-
goto _test_eof5;
|
242
|
-
case 5:
|
243
|
-
#line 244 "unicorn_http.h"
|
244
|
-
if ( (*p) == 72 )
|
245
|
-
goto tr9;
|
246
|
-
goto st0;
|
247
|
-
tr9:
|
248
|
-
#line 64 "unicorn_http.rl"
|
249
|
-
{MARK(mark, p); }
|
250
|
-
goto st6;
|
251
|
-
st6:
|
252
|
-
if ( ++p == pe )
|
253
|
-
goto _test_eof6;
|
254
|
-
case 6:
|
255
|
-
#line 256 "unicorn_http.h"
|
256
|
-
if ( (*p) == 84 )
|
257
|
-
goto st7;
|
258
|
-
goto st0;
|
259
|
-
st7:
|
260
|
-
if ( ++p == pe )
|
261
|
-
goto _test_eof7;
|
262
|
-
case 7:
|
263
|
-
if ( (*p) == 84 )
|
264
|
-
goto st8;
|
265
|
-
goto st0;
|
266
|
-
st8:
|
267
|
-
if ( ++p == pe )
|
268
|
-
goto _test_eof8;
|
269
|
-
case 8:
|
270
|
-
if ( (*p) == 80 )
|
271
|
-
goto st9;
|
272
|
-
goto st0;
|
273
|
-
st9:
|
274
|
-
if ( ++p == pe )
|
275
|
-
goto _test_eof9;
|
276
|
-
case 9:
|
277
|
-
if ( (*p) == 47 )
|
278
|
-
goto st10;
|
279
|
-
goto st0;
|
280
|
-
st10:
|
281
|
-
if ( ++p == pe )
|
282
|
-
goto _test_eof10;
|
283
|
-
case 10:
|
284
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
285
|
-
goto st11;
|
286
|
-
goto st0;
|
287
|
-
st11:
|
288
|
-
if ( ++p == pe )
|
289
|
-
goto _test_eof11;
|
290
|
-
case 11:
|
291
|
-
if ( (*p) == 46 )
|
292
|
-
goto st12;
|
293
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
294
|
-
goto st11;
|
295
|
-
goto st0;
|
296
|
-
st12:
|
297
|
-
if ( ++p == pe )
|
298
|
-
goto _test_eof12;
|
299
|
-
case 12:
|
300
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
301
|
-
goto st13;
|
302
|
-
goto st0;
|
303
|
-
st13:
|
304
|
-
if ( ++p == pe )
|
305
|
-
goto _test_eof13;
|
306
|
-
case 13:
|
307
|
-
if ( (*p) == 13 )
|
308
|
-
goto tr17;
|
309
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
310
|
-
goto st13;
|
311
|
-
goto st0;
|
312
|
-
tr17:
|
313
|
-
#line 94 "unicorn_http.rl"
|
314
|
-
{
|
315
|
-
http_version(parser->data, PTR_TO(mark), LEN(mark, p));
|
316
|
-
}
|
317
|
-
goto st14;
|
318
|
-
tr25:
|
319
|
-
#line 73 "unicorn_http.rl"
|
320
|
-
{ MARK(mark, p); }
|
321
|
-
#line 74 "unicorn_http.rl"
|
322
|
-
{
|
323
|
-
http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
324
|
-
}
|
325
|
-
goto st14;
|
326
|
-
tr28:
|
327
|
-
#line 74 "unicorn_http.rl"
|
328
|
-
{
|
329
|
-
http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
330
|
-
}
|
331
|
-
goto st14;
|
332
|
-
st14:
|
333
|
-
if ( ++p == pe )
|
334
|
-
goto _test_eof14;
|
335
|
-
case 14:
|
336
|
-
#line 337 "unicorn_http.h"
|
337
|
-
if ( (*p) == 10 )
|
338
|
-
goto st15;
|
339
|
-
goto st0;
|
340
|
-
st15:
|
341
|
-
if ( ++p == pe )
|
342
|
-
goto _test_eof15;
|
343
|
-
case 15:
|
344
|
-
switch( (*p) ) {
|
345
|
-
case 13: goto st16;
|
346
|
-
case 33: goto tr20;
|
347
|
-
case 124: goto tr20;
|
348
|
-
case 126: goto tr20;
|
349
|
-
}
|
350
|
-
if ( (*p) < 45 ) {
|
351
|
-
if ( (*p) > 39 ) {
|
352
|
-
if ( 42 <= (*p) && (*p) <= 43 )
|
353
|
-
goto tr20;
|
354
|
-
} else if ( (*p) >= 35 )
|
355
|
-
goto tr20;
|
356
|
-
} else if ( (*p) > 46 ) {
|
357
|
-
if ( (*p) < 65 ) {
|
358
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
359
|
-
goto tr20;
|
360
|
-
} else if ( (*p) > 90 ) {
|
361
|
-
if ( 94 <= (*p) && (*p) <= 122 )
|
362
|
-
goto tr20;
|
363
|
-
} else
|
364
|
-
goto tr20;
|
365
|
-
} else
|
366
|
-
goto tr20;
|
367
|
-
goto st0;
|
368
|
-
st16:
|
369
|
-
if ( ++p == pe )
|
370
|
-
goto _test_eof16;
|
371
|
-
case 16:
|
372
|
-
if ( (*p) == 10 )
|
373
|
-
goto tr21;
|
374
|
-
goto st0;
|
375
|
-
tr21:
|
376
|
-
#line 102 "unicorn_http.rl"
|
377
|
-
{
|
378
|
-
parser->body_start = p - buffer + 1;
|
379
|
-
header_done(parser->data, p + 1, pe - p - 1);
|
380
|
-
{p++; cs = 63; goto _out;}
|
381
|
-
}
|
382
|
-
goto st63;
|
383
|
-
st63:
|
384
|
-
if ( ++p == pe )
|
385
|
-
goto _test_eof63;
|
386
|
-
case 63:
|
387
|
-
#line 388 "unicorn_http.h"
|
388
|
-
goto st0;
|
389
|
-
tr20:
|
390
|
-
#line 66 "unicorn_http.rl"
|
391
|
-
{ MARK(field_start, p); }
|
392
|
-
#line 67 "unicorn_http.rl"
|
393
|
-
{ snake_upcase_char((char *)p); }
|
394
|
-
goto st17;
|
395
|
-
tr22:
|
396
|
-
#line 67 "unicorn_http.rl"
|
397
|
-
{ snake_upcase_char((char *)p); }
|
398
|
-
goto st17;
|
399
|
-
st17:
|
400
|
-
if ( ++p == pe )
|
401
|
-
goto _test_eof17;
|
402
|
-
case 17:
|
403
|
-
#line 404 "unicorn_http.h"
|
404
|
-
switch( (*p) ) {
|
405
|
-
case 33: goto tr22;
|
406
|
-
case 58: goto tr23;
|
407
|
-
case 124: goto tr22;
|
408
|
-
case 126: goto tr22;
|
409
|
-
}
|
410
|
-
if ( (*p) < 45 ) {
|
411
|
-
if ( (*p) > 39 ) {
|
412
|
-
if ( 42 <= (*p) && (*p) <= 43 )
|
413
|
-
goto tr22;
|
414
|
-
} else if ( (*p) >= 35 )
|
415
|
-
goto tr22;
|
416
|
-
} else if ( (*p) > 46 ) {
|
417
|
-
if ( (*p) < 65 ) {
|
418
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
419
|
-
goto tr22;
|
420
|
-
} else if ( (*p) > 90 ) {
|
421
|
-
if ( 94 <= (*p) && (*p) <= 122 )
|
422
|
-
goto tr22;
|
423
|
-
} else
|
424
|
-
goto tr22;
|
425
|
-
} else
|
426
|
-
goto tr22;
|
427
|
-
goto st0;
|
428
|
-
tr23:
|
429
|
-
#line 69 "unicorn_http.rl"
|
430
|
-
{
|
431
|
-
parser->field_len = LEN(field_start, p);
|
432
|
-
}
|
433
|
-
goto st18;
|
434
|
-
tr26:
|
435
|
-
#line 73 "unicorn_http.rl"
|
436
|
-
{ MARK(mark, p); }
|
437
|
-
goto st18;
|
438
|
-
st18:
|
439
|
-
if ( ++p == pe )
|
440
|
-
goto _test_eof18;
|
441
|
-
case 18:
|
442
|
-
#line 443 "unicorn_http.h"
|
443
|
-
switch( (*p) ) {
|
444
|
-
case 13: goto tr25;
|
445
|
-
case 32: goto tr26;
|
446
|
-
}
|
447
|
-
goto tr24;
|
448
|
-
tr24:
|
449
|
-
#line 73 "unicorn_http.rl"
|
450
|
-
{ MARK(mark, p); }
|
451
|
-
goto st19;
|
452
|
-
st19:
|
453
|
-
if ( ++p == pe )
|
454
|
-
goto _test_eof19;
|
455
|
-
case 19:
|
456
|
-
#line 457 "unicorn_http.h"
|
457
|
-
if ( (*p) == 13 )
|
458
|
-
goto tr28;
|
459
|
-
goto st19;
|
460
|
-
tr8:
|
461
|
-
#line 82 "unicorn_http.rl"
|
462
|
-
{
|
463
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
464
|
-
}
|
465
|
-
goto st20;
|
466
|
-
tr38:
|
467
|
-
#line 98 "unicorn_http.rl"
|
468
|
-
{
|
469
|
-
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
470
|
-
}
|
471
|
-
#line 82 "unicorn_http.rl"
|
472
|
-
{
|
473
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
474
|
-
}
|
475
|
-
goto st20;
|
476
|
-
tr49:
|
477
|
-
#line 89 "unicorn_http.rl"
|
478
|
-
{MARK(query_start, p); }
|
479
|
-
#line 90 "unicorn_http.rl"
|
480
|
-
{
|
481
|
-
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
482
|
-
}
|
483
|
-
#line 82 "unicorn_http.rl"
|
484
|
-
{
|
485
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
486
|
-
}
|
487
|
-
goto st20;
|
488
|
-
tr53:
|
489
|
-
#line 90 "unicorn_http.rl"
|
490
|
-
{
|
491
|
-
query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
492
|
-
}
|
493
|
-
#line 82 "unicorn_http.rl"
|
494
|
-
{
|
495
|
-
request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
496
|
-
}
|
497
|
-
goto st20;
|
498
|
-
st20:
|
499
|
-
if ( ++p == pe )
|
500
|
-
goto _test_eof20;
|
501
|
-
case 20:
|
502
|
-
#line 503 "unicorn_http.h"
|
503
|
-
switch( (*p) ) {
|
504
|
-
case 32: goto tr30;
|
505
|
-
case 35: goto st0;
|
506
|
-
case 37: goto tr31;
|
507
|
-
case 127: goto st0;
|
508
|
-
}
|
509
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
510
|
-
goto st0;
|
511
|
-
goto tr29;
|
512
|
-
tr29:
|
513
|
-
#line 64 "unicorn_http.rl"
|
514
|
-
{MARK(mark, p); }
|
515
|
-
goto st21;
|
516
|
-
st21:
|
517
|
-
if ( ++p == pe )
|
518
|
-
goto _test_eof21;
|
519
|
-
case 21:
|
520
|
-
#line 521 "unicorn_http.h"
|
521
|
-
switch( (*p) ) {
|
522
|
-
case 32: goto tr33;
|
523
|
-
case 35: goto st0;
|
524
|
-
case 37: goto st22;
|
525
|
-
case 127: goto st0;
|
526
|
-
}
|
527
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
528
|
-
goto st0;
|
529
|
-
goto st21;
|
530
|
-
tr31:
|
531
|
-
#line 64 "unicorn_http.rl"
|
532
|
-
{MARK(mark, p); }
|
533
|
-
goto st22;
|
534
|
-
st22:
|
535
|
-
if ( ++p == pe )
|
536
|
-
goto _test_eof22;
|
537
|
-
case 22:
|
538
|
-
#line 539 "unicorn_http.h"
|
539
|
-
if ( (*p) < 65 ) {
|
540
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
541
|
-
goto st23;
|
542
|
-
} else if ( (*p) > 70 ) {
|
543
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
544
|
-
goto st23;
|
545
|
-
} else
|
546
|
-
goto st23;
|
547
|
-
goto st0;
|
548
|
-
st23:
|
549
|
-
if ( ++p == pe )
|
550
|
-
goto _test_eof23;
|
551
|
-
case 23:
|
552
|
-
if ( (*p) < 65 ) {
|
553
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
554
|
-
goto st21;
|
555
|
-
} else if ( (*p) > 70 ) {
|
556
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
557
|
-
goto st21;
|
558
|
-
} else
|
559
|
-
goto st21;
|
560
|
-
goto st0;
|
561
|
-
tr5:
|
562
|
-
#line 64 "unicorn_http.rl"
|
563
|
-
{MARK(mark, p); }
|
564
|
-
goto st24;
|
565
|
-
tr65:
|
566
|
-
#line 81 "unicorn_http.rl"
|
567
|
-
{ host(parser->data, PTR_TO(mark), LEN(mark, p)); }
|
568
|
-
#line 64 "unicorn_http.rl"
|
569
|
-
{MARK(mark, p); }
|
570
|
-
goto st24;
|
571
|
-
st24:
|
572
|
-
if ( ++p == pe )
|
573
|
-
goto _test_eof24;
|
574
|
-
case 24:
|
575
|
-
#line 576 "unicorn_http.h"
|
576
|
-
switch( (*p) ) {
|
577
|
-
case 32: goto tr37;
|
578
|
-
case 35: goto tr38;
|
579
|
-
case 37: goto st25;
|
580
|
-
case 59: goto tr40;
|
581
|
-
case 63: goto tr41;
|
582
|
-
case 127: goto st0;
|
583
|
-
}
|
584
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
585
|
-
goto st0;
|
586
|
-
goto st24;
|
587
|
-
st25:
|
588
|
-
if ( ++p == pe )
|
589
|
-
goto _test_eof25;
|
590
|
-
case 25:
|
591
|
-
if ( (*p) < 65 ) {
|
592
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
593
|
-
goto st26;
|
594
|
-
} else if ( (*p) > 70 ) {
|
595
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
596
|
-
goto st26;
|
597
|
-
} else
|
598
|
-
goto st26;
|
599
|
-
goto st0;
|
600
|
-
st26:
|
601
|
-
if ( ++p == pe )
|
602
|
-
goto _test_eof26;
|
603
|
-
case 26:
|
604
|
-
if ( (*p) < 65 ) {
|
605
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
606
|
-
goto st24;
|
607
|
-
} else if ( (*p) > 70 ) {
|
608
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
609
|
-
goto st24;
|
610
|
-
} else
|
611
|
-
goto st24;
|
612
|
-
goto st0;
|
613
|
-
tr40:
|
614
|
-
#line 98 "unicorn_http.rl"
|
615
|
-
{
|
616
|
-
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
617
|
-
}
|
618
|
-
goto st27;
|
619
|
-
st27:
|
620
|
-
if ( ++p == pe )
|
621
|
-
goto _test_eof27;
|
622
|
-
case 27:
|
623
|
-
#line 624 "unicorn_http.h"
|
624
|
-
switch( (*p) ) {
|
625
|
-
case 32: goto tr7;
|
626
|
-
case 35: goto tr8;
|
627
|
-
case 37: goto st28;
|
628
|
-
case 63: goto st30;
|
629
|
-
case 127: goto st0;
|
630
|
-
}
|
631
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
632
|
-
goto st0;
|
633
|
-
goto st27;
|
634
|
-
st28:
|
635
|
-
if ( ++p == pe )
|
636
|
-
goto _test_eof28;
|
637
|
-
case 28:
|
638
|
-
if ( (*p) < 65 ) {
|
639
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
640
|
-
goto st29;
|
641
|
-
} else if ( (*p) > 70 ) {
|
642
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
643
|
-
goto st29;
|
644
|
-
} else
|
645
|
-
goto st29;
|
646
|
-
goto st0;
|
647
|
-
st29:
|
648
|
-
if ( ++p == pe )
|
649
|
-
goto _test_eof29;
|
650
|
-
case 29:
|
651
|
-
if ( (*p) < 65 ) {
|
652
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
653
|
-
goto st27;
|
654
|
-
} else if ( (*p) > 70 ) {
|
655
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
656
|
-
goto st27;
|
657
|
-
} else
|
658
|
-
goto st27;
|
659
|
-
goto st0;
|
660
|
-
tr41:
|
661
|
-
#line 98 "unicorn_http.rl"
|
662
|
-
{
|
663
|
-
request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
664
|
-
}
|
665
|
-
goto st30;
|
666
|
-
st30:
|
667
|
-
if ( ++p == pe )
|
668
|
-
goto _test_eof30;
|
669
|
-
case 30:
|
670
|
-
#line 671 "unicorn_http.h"
|
671
|
-
switch( (*p) ) {
|
672
|
-
case 32: goto tr48;
|
673
|
-
case 35: goto tr49;
|
674
|
-
case 37: goto tr50;
|
675
|
-
case 127: goto st0;
|
676
|
-
}
|
677
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
678
|
-
goto st0;
|
679
|
-
goto tr47;
|
680
|
-
tr47:
|
681
|
-
#line 89 "unicorn_http.rl"
|
682
|
-
{MARK(query_start, p); }
|
683
|
-
goto st31;
|
684
|
-
st31:
|
685
|
-
if ( ++p == pe )
|
686
|
-
goto _test_eof31;
|
687
|
-
case 31:
|
688
|
-
#line 689 "unicorn_http.h"
|
689
|
-
switch( (*p) ) {
|
690
|
-
case 32: goto tr52;
|
691
|
-
case 35: goto tr53;
|
692
|
-
case 37: goto st32;
|
693
|
-
case 127: goto st0;
|
694
|
-
}
|
695
|
-
if ( 0 <= (*p) && (*p) <= 31 )
|
696
|
-
goto st0;
|
697
|
-
goto st31;
|
698
|
-
tr50:
|
699
|
-
#line 89 "unicorn_http.rl"
|
700
|
-
{MARK(query_start, p); }
|
701
|
-
goto st32;
|
702
|
-
st32:
|
703
|
-
if ( ++p == pe )
|
704
|
-
goto _test_eof32;
|
705
|
-
case 32:
|
706
|
-
#line 707 "unicorn_http.h"
|
707
|
-
if ( (*p) < 65 ) {
|
708
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
709
|
-
goto st33;
|
710
|
-
} else if ( (*p) > 70 ) {
|
711
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
712
|
-
goto st33;
|
713
|
-
} else
|
714
|
-
goto st33;
|
715
|
-
goto st0;
|
716
|
-
st33:
|
717
|
-
if ( ++p == pe )
|
718
|
-
goto _test_eof33;
|
719
|
-
case 33:
|
720
|
-
if ( (*p) < 65 ) {
|
721
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
722
|
-
goto st31;
|
723
|
-
} else if ( (*p) > 70 ) {
|
724
|
-
if ( 97 <= (*p) && (*p) <= 102 )
|
725
|
-
goto st31;
|
726
|
-
} else
|
727
|
-
goto st31;
|
728
|
-
goto st0;
|
729
|
-
tr6:
|
730
|
-
#line 64 "unicorn_http.rl"
|
731
|
-
{MARK(mark, p); }
|
732
|
-
#line 68 "unicorn_http.rl"
|
733
|
-
{ downcase_char((char *)p); }
|
734
|
-
goto st34;
|
735
|
-
st34:
|
736
|
-
if ( ++p == pe )
|
737
|
-
goto _test_eof34;
|
738
|
-
case 34:
|
739
|
-
#line 740 "unicorn_http.h"
|
740
|
-
switch( (*p) ) {
|
741
|
-
case 84: goto tr56;
|
742
|
-
case 116: goto tr56;
|
743
|
-
}
|
744
|
-
goto st0;
|
745
|
-
tr56:
|
746
|
-
#line 68 "unicorn_http.rl"
|
747
|
-
{ downcase_char((char *)p); }
|
748
|
-
goto st35;
|
749
|
-
st35:
|
750
|
-
if ( ++p == pe )
|
751
|
-
goto _test_eof35;
|
752
|
-
case 35:
|
753
|
-
#line 754 "unicorn_http.h"
|
754
|
-
switch( (*p) ) {
|
755
|
-
case 84: goto tr57;
|
756
|
-
case 116: goto tr57;
|
757
|
-
}
|
758
|
-
goto st0;
|
759
|
-
tr57:
|
760
|
-
#line 68 "unicorn_http.rl"
|
761
|
-
{ downcase_char((char *)p); }
|
762
|
-
goto st36;
|
763
|
-
st36:
|
764
|
-
if ( ++p == pe )
|
765
|
-
goto _test_eof36;
|
766
|
-
case 36:
|
767
|
-
#line 768 "unicorn_http.h"
|
768
|
-
switch( (*p) ) {
|
769
|
-
case 80: goto tr58;
|
770
|
-
case 112: goto tr58;
|
771
|
-
}
|
772
|
-
goto st0;
|
773
|
-
tr58:
|
774
|
-
#line 68 "unicorn_http.rl"
|
775
|
-
{ downcase_char((char *)p); }
|
776
|
-
goto st37;
|
777
|
-
st37:
|
778
|
-
if ( ++p == pe )
|
779
|
-
goto _test_eof37;
|
780
|
-
case 37:
|
781
|
-
#line 782 "unicorn_http.h"
|
782
|
-
switch( (*p) ) {
|
783
|
-
case 58: goto tr59;
|
784
|
-
case 83: goto tr60;
|
785
|
-
case 115: goto tr60;
|
786
|
-
}
|
787
|
-
goto st0;
|
788
|
-
tr59:
|
789
|
-
#line 80 "unicorn_http.rl"
|
790
|
-
{ scheme(parser->data, PTR_TO(mark), LEN(mark, p)); }
|
791
|
-
goto st38;
|
792
|
-
st38:
|
793
|
-
if ( ++p == pe )
|
794
|
-
goto _test_eof38;
|
795
|
-
case 38:
|
796
|
-
#line 797 "unicorn_http.h"
|
797
|
-
if ( (*p) == 47 )
|
798
|
-
goto st39;
|
799
|
-
goto st0;
|
800
|
-
st39:
|
801
|
-
if ( ++p == pe )
|
802
|
-
goto _test_eof39;
|
803
|
-
case 39:
|
804
|
-
if ( (*p) == 47 )
|
805
|
-
goto st40;
|
806
|
-
goto st0;
|
807
|
-
st40:
|
808
|
-
if ( ++p == pe )
|
809
|
-
goto _test_eof40;
|
810
|
-
case 40:
|
811
|
-
if ( (*p) == 95 )
|
812
|
-
goto tr63;
|
813
|
-
if ( (*p) < 48 ) {
|
814
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
815
|
-
goto tr63;
|
816
|
-
} else if ( (*p) > 57 ) {
|
817
|
-
if ( (*p) > 90 ) {
|
818
|
-
if ( 97 <= (*p) && (*p) <= 122 )
|
819
|
-
goto tr63;
|
820
|
-
} else if ( (*p) >= 65 )
|
821
|
-
goto tr63;
|
822
|
-
} else
|
823
|
-
goto tr63;
|
824
|
-
goto st0;
|
825
|
-
tr63:
|
826
|
-
#line 64 "unicorn_http.rl"
|
827
|
-
{MARK(mark, p); }
|
828
|
-
goto st41;
|
829
|
-
st41:
|
830
|
-
if ( ++p == pe )
|
831
|
-
goto _test_eof41;
|
832
|
-
case 41:
|
833
|
-
#line 834 "unicorn_http.h"
|
834
|
-
switch( (*p) ) {
|
835
|
-
case 47: goto tr65;
|
836
|
-
case 58: goto st42;
|
837
|
-
case 95: goto st41;
|
838
|
-
}
|
839
|
-
if ( (*p) < 65 ) {
|
840
|
-
if ( 45 <= (*p) && (*p) <= 57 )
|
841
|
-
goto st41;
|
842
|
-
} else if ( (*p) > 90 ) {
|
843
|
-
if ( 97 <= (*p) && (*p) <= 122 )
|
844
|
-
goto st41;
|
845
|
-
} else
|
846
|
-
goto st41;
|
847
|
-
goto st0;
|
848
|
-
st42:
|
849
|
-
if ( ++p == pe )
|
850
|
-
goto _test_eof42;
|
851
|
-
case 42:
|
852
|
-
if ( (*p) == 47 )
|
853
|
-
goto tr65;
|
854
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
855
|
-
goto st42;
|
856
|
-
goto st0;
|
857
|
-
tr60:
|
858
|
-
#line 68 "unicorn_http.rl"
|
859
|
-
{ downcase_char((char *)p); }
|
860
|
-
goto st43;
|
861
|
-
st43:
|
862
|
-
if ( ++p == pe )
|
863
|
-
goto _test_eof43;
|
864
|
-
case 43:
|
865
|
-
#line 866 "unicorn_http.h"
|
866
|
-
if ( (*p) == 58 )
|
867
|
-
goto tr59;
|
868
|
-
goto st0;
|
869
|
-
st44:
|
870
|
-
if ( ++p == pe )
|
871
|
-
goto _test_eof44;
|
872
|
-
case 44:
|
873
|
-
switch( (*p) ) {
|
874
|
-
case 32: goto tr2;
|
875
|
-
case 36: goto st45;
|
876
|
-
case 95: goto st45;
|
877
|
-
}
|
878
|
-
if ( (*p) < 48 ) {
|
879
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
880
|
-
goto st45;
|
881
|
-
} else if ( (*p) > 57 ) {
|
882
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
883
|
-
goto st45;
|
884
|
-
} else
|
885
|
-
goto st45;
|
886
|
-
goto st0;
|
887
|
-
st45:
|
888
|
-
if ( ++p == pe )
|
889
|
-
goto _test_eof45;
|
890
|
-
case 45:
|
891
|
-
switch( (*p) ) {
|
892
|
-
case 32: goto tr2;
|
893
|
-
case 36: goto st46;
|
894
|
-
case 95: goto st46;
|
895
|
-
}
|
896
|
-
if ( (*p) < 48 ) {
|
897
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
898
|
-
goto st46;
|
899
|
-
} else if ( (*p) > 57 ) {
|
900
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
901
|
-
goto st46;
|
902
|
-
} else
|
903
|
-
goto st46;
|
904
|
-
goto st0;
|
905
|
-
st46:
|
906
|
-
if ( ++p == pe )
|
907
|
-
goto _test_eof46;
|
908
|
-
case 46:
|
909
|
-
switch( (*p) ) {
|
910
|
-
case 32: goto tr2;
|
911
|
-
case 36: goto st47;
|
912
|
-
case 95: goto st47;
|
913
|
-
}
|
914
|
-
if ( (*p) < 48 ) {
|
915
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
916
|
-
goto st47;
|
917
|
-
} else if ( (*p) > 57 ) {
|
918
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
919
|
-
goto st47;
|
920
|
-
} else
|
921
|
-
goto st47;
|
922
|
-
goto st0;
|
923
|
-
st47:
|
924
|
-
if ( ++p == pe )
|
925
|
-
goto _test_eof47;
|
926
|
-
case 47:
|
927
|
-
switch( (*p) ) {
|
928
|
-
case 32: goto tr2;
|
929
|
-
case 36: goto st48;
|
930
|
-
case 95: goto st48;
|
931
|
-
}
|
932
|
-
if ( (*p) < 48 ) {
|
933
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
934
|
-
goto st48;
|
935
|
-
} else if ( (*p) > 57 ) {
|
936
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
937
|
-
goto st48;
|
938
|
-
} else
|
939
|
-
goto st48;
|
940
|
-
goto st0;
|
941
|
-
st48:
|
942
|
-
if ( ++p == pe )
|
943
|
-
goto _test_eof48;
|
944
|
-
case 48:
|
945
|
-
switch( (*p) ) {
|
946
|
-
case 32: goto tr2;
|
947
|
-
case 36: goto st49;
|
948
|
-
case 95: goto st49;
|
949
|
-
}
|
950
|
-
if ( (*p) < 48 ) {
|
951
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
952
|
-
goto st49;
|
953
|
-
} else if ( (*p) > 57 ) {
|
954
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
955
|
-
goto st49;
|
956
|
-
} else
|
957
|
-
goto st49;
|
958
|
-
goto st0;
|
959
|
-
st49:
|
960
|
-
if ( ++p == pe )
|
961
|
-
goto _test_eof49;
|
962
|
-
case 49:
|
963
|
-
switch( (*p) ) {
|
964
|
-
case 32: goto tr2;
|
965
|
-
case 36: goto st50;
|
966
|
-
case 95: goto st50;
|
967
|
-
}
|
968
|
-
if ( (*p) < 48 ) {
|
969
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
970
|
-
goto st50;
|
971
|
-
} else if ( (*p) > 57 ) {
|
972
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
973
|
-
goto st50;
|
974
|
-
} else
|
975
|
-
goto st50;
|
976
|
-
goto st0;
|
977
|
-
st50:
|
978
|
-
if ( ++p == pe )
|
979
|
-
goto _test_eof50;
|
980
|
-
case 50:
|
981
|
-
switch( (*p) ) {
|
982
|
-
case 32: goto tr2;
|
983
|
-
case 36: goto st51;
|
984
|
-
case 95: goto st51;
|
985
|
-
}
|
986
|
-
if ( (*p) < 48 ) {
|
987
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
988
|
-
goto st51;
|
989
|
-
} else if ( (*p) > 57 ) {
|
990
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
991
|
-
goto st51;
|
992
|
-
} else
|
993
|
-
goto st51;
|
994
|
-
goto st0;
|
995
|
-
st51:
|
996
|
-
if ( ++p == pe )
|
997
|
-
goto _test_eof51;
|
998
|
-
case 51:
|
999
|
-
switch( (*p) ) {
|
1000
|
-
case 32: goto tr2;
|
1001
|
-
case 36: goto st52;
|
1002
|
-
case 95: goto st52;
|
1003
|
-
}
|
1004
|
-
if ( (*p) < 48 ) {
|
1005
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1006
|
-
goto st52;
|
1007
|
-
} else if ( (*p) > 57 ) {
|
1008
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1009
|
-
goto st52;
|
1010
|
-
} else
|
1011
|
-
goto st52;
|
1012
|
-
goto st0;
|
1013
|
-
st52:
|
1014
|
-
if ( ++p == pe )
|
1015
|
-
goto _test_eof52;
|
1016
|
-
case 52:
|
1017
|
-
switch( (*p) ) {
|
1018
|
-
case 32: goto tr2;
|
1019
|
-
case 36: goto st53;
|
1020
|
-
case 95: goto st53;
|
1021
|
-
}
|
1022
|
-
if ( (*p) < 48 ) {
|
1023
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1024
|
-
goto st53;
|
1025
|
-
} else if ( (*p) > 57 ) {
|
1026
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1027
|
-
goto st53;
|
1028
|
-
} else
|
1029
|
-
goto st53;
|
1030
|
-
goto st0;
|
1031
|
-
st53:
|
1032
|
-
if ( ++p == pe )
|
1033
|
-
goto _test_eof53;
|
1034
|
-
case 53:
|
1035
|
-
switch( (*p) ) {
|
1036
|
-
case 32: goto tr2;
|
1037
|
-
case 36: goto st54;
|
1038
|
-
case 95: goto st54;
|
1039
|
-
}
|
1040
|
-
if ( (*p) < 48 ) {
|
1041
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1042
|
-
goto st54;
|
1043
|
-
} else if ( (*p) > 57 ) {
|
1044
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1045
|
-
goto st54;
|
1046
|
-
} else
|
1047
|
-
goto st54;
|
1048
|
-
goto st0;
|
1049
|
-
st54:
|
1050
|
-
if ( ++p == pe )
|
1051
|
-
goto _test_eof54;
|
1052
|
-
case 54:
|
1053
|
-
switch( (*p) ) {
|
1054
|
-
case 32: goto tr2;
|
1055
|
-
case 36: goto st55;
|
1056
|
-
case 95: goto st55;
|
1057
|
-
}
|
1058
|
-
if ( (*p) < 48 ) {
|
1059
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1060
|
-
goto st55;
|
1061
|
-
} else if ( (*p) > 57 ) {
|
1062
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1063
|
-
goto st55;
|
1064
|
-
} else
|
1065
|
-
goto st55;
|
1066
|
-
goto st0;
|
1067
|
-
st55:
|
1068
|
-
if ( ++p == pe )
|
1069
|
-
goto _test_eof55;
|
1070
|
-
case 55:
|
1071
|
-
switch( (*p) ) {
|
1072
|
-
case 32: goto tr2;
|
1073
|
-
case 36: goto st56;
|
1074
|
-
case 95: goto st56;
|
1075
|
-
}
|
1076
|
-
if ( (*p) < 48 ) {
|
1077
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1078
|
-
goto st56;
|
1079
|
-
} else if ( (*p) > 57 ) {
|
1080
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1081
|
-
goto st56;
|
1082
|
-
} else
|
1083
|
-
goto st56;
|
1084
|
-
goto st0;
|
1085
|
-
st56:
|
1086
|
-
if ( ++p == pe )
|
1087
|
-
goto _test_eof56;
|
1088
|
-
case 56:
|
1089
|
-
switch( (*p) ) {
|
1090
|
-
case 32: goto tr2;
|
1091
|
-
case 36: goto st57;
|
1092
|
-
case 95: goto st57;
|
1093
|
-
}
|
1094
|
-
if ( (*p) < 48 ) {
|
1095
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1096
|
-
goto st57;
|
1097
|
-
} else if ( (*p) > 57 ) {
|
1098
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1099
|
-
goto st57;
|
1100
|
-
} else
|
1101
|
-
goto st57;
|
1102
|
-
goto st0;
|
1103
|
-
st57:
|
1104
|
-
if ( ++p == pe )
|
1105
|
-
goto _test_eof57;
|
1106
|
-
case 57:
|
1107
|
-
switch( (*p) ) {
|
1108
|
-
case 32: goto tr2;
|
1109
|
-
case 36: goto st58;
|
1110
|
-
case 95: goto st58;
|
1111
|
-
}
|
1112
|
-
if ( (*p) < 48 ) {
|
1113
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1114
|
-
goto st58;
|
1115
|
-
} else if ( (*p) > 57 ) {
|
1116
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1117
|
-
goto st58;
|
1118
|
-
} else
|
1119
|
-
goto st58;
|
1120
|
-
goto st0;
|
1121
|
-
st58:
|
1122
|
-
if ( ++p == pe )
|
1123
|
-
goto _test_eof58;
|
1124
|
-
case 58:
|
1125
|
-
switch( (*p) ) {
|
1126
|
-
case 32: goto tr2;
|
1127
|
-
case 36: goto st59;
|
1128
|
-
case 95: goto st59;
|
1129
|
-
}
|
1130
|
-
if ( (*p) < 48 ) {
|
1131
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1132
|
-
goto st59;
|
1133
|
-
} else if ( (*p) > 57 ) {
|
1134
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1135
|
-
goto st59;
|
1136
|
-
} else
|
1137
|
-
goto st59;
|
1138
|
-
goto st0;
|
1139
|
-
st59:
|
1140
|
-
if ( ++p == pe )
|
1141
|
-
goto _test_eof59;
|
1142
|
-
case 59:
|
1143
|
-
switch( (*p) ) {
|
1144
|
-
case 32: goto tr2;
|
1145
|
-
case 36: goto st60;
|
1146
|
-
case 95: goto st60;
|
1147
|
-
}
|
1148
|
-
if ( (*p) < 48 ) {
|
1149
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1150
|
-
goto st60;
|
1151
|
-
} else if ( (*p) > 57 ) {
|
1152
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1153
|
-
goto st60;
|
1154
|
-
} else
|
1155
|
-
goto st60;
|
1156
|
-
goto st0;
|
1157
|
-
st60:
|
1158
|
-
if ( ++p == pe )
|
1159
|
-
goto _test_eof60;
|
1160
|
-
case 60:
|
1161
|
-
switch( (*p) ) {
|
1162
|
-
case 32: goto tr2;
|
1163
|
-
case 36: goto st61;
|
1164
|
-
case 95: goto st61;
|
1165
|
-
}
|
1166
|
-
if ( (*p) < 48 ) {
|
1167
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1168
|
-
goto st61;
|
1169
|
-
} else if ( (*p) > 57 ) {
|
1170
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1171
|
-
goto st61;
|
1172
|
-
} else
|
1173
|
-
goto st61;
|
1174
|
-
goto st0;
|
1175
|
-
st61:
|
1176
|
-
if ( ++p == pe )
|
1177
|
-
goto _test_eof61;
|
1178
|
-
case 61:
|
1179
|
-
switch( (*p) ) {
|
1180
|
-
case 32: goto tr2;
|
1181
|
-
case 36: goto st62;
|
1182
|
-
case 95: goto st62;
|
1183
|
-
}
|
1184
|
-
if ( (*p) < 48 ) {
|
1185
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
1186
|
-
goto st62;
|
1187
|
-
} else if ( (*p) > 57 ) {
|
1188
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
1189
|
-
goto st62;
|
1190
|
-
} else
|
1191
|
-
goto st62;
|
1192
|
-
goto st0;
|
1193
|
-
st62:
|
1194
|
-
if ( ++p == pe )
|
1195
|
-
goto _test_eof62;
|
1196
|
-
case 62:
|
1197
|
-
if ( (*p) == 32 )
|
1198
|
-
goto tr2;
|
1199
|
-
goto st0;
|
1200
|
-
}
|
1201
|
-
_test_eof2: cs = 2; goto _test_eof;
|
1202
|
-
_test_eof3: cs = 3; goto _test_eof;
|
1203
|
-
_test_eof4: cs = 4; goto _test_eof;
|
1204
|
-
_test_eof5: cs = 5; goto _test_eof;
|
1205
|
-
_test_eof6: cs = 6; goto _test_eof;
|
1206
|
-
_test_eof7: cs = 7; goto _test_eof;
|
1207
|
-
_test_eof8: cs = 8; goto _test_eof;
|
1208
|
-
_test_eof9: cs = 9; goto _test_eof;
|
1209
|
-
_test_eof10: cs = 10; goto _test_eof;
|
1210
|
-
_test_eof11: cs = 11; goto _test_eof;
|
1211
|
-
_test_eof12: cs = 12; goto _test_eof;
|
1212
|
-
_test_eof13: cs = 13; goto _test_eof;
|
1213
|
-
_test_eof14: cs = 14; goto _test_eof;
|
1214
|
-
_test_eof15: cs = 15; goto _test_eof;
|
1215
|
-
_test_eof16: cs = 16; goto _test_eof;
|
1216
|
-
_test_eof63: cs = 63; goto _test_eof;
|
1217
|
-
_test_eof17: cs = 17; goto _test_eof;
|
1218
|
-
_test_eof18: cs = 18; goto _test_eof;
|
1219
|
-
_test_eof19: cs = 19; goto _test_eof;
|
1220
|
-
_test_eof20: cs = 20; goto _test_eof;
|
1221
|
-
_test_eof21: cs = 21; goto _test_eof;
|
1222
|
-
_test_eof22: cs = 22; goto _test_eof;
|
1223
|
-
_test_eof23: cs = 23; goto _test_eof;
|
1224
|
-
_test_eof24: cs = 24; goto _test_eof;
|
1225
|
-
_test_eof25: cs = 25; goto _test_eof;
|
1226
|
-
_test_eof26: cs = 26; goto _test_eof;
|
1227
|
-
_test_eof27: cs = 27; goto _test_eof;
|
1228
|
-
_test_eof28: cs = 28; goto _test_eof;
|
1229
|
-
_test_eof29: cs = 29; goto _test_eof;
|
1230
|
-
_test_eof30: cs = 30; goto _test_eof;
|
1231
|
-
_test_eof31: cs = 31; goto _test_eof;
|
1232
|
-
_test_eof32: cs = 32; goto _test_eof;
|
1233
|
-
_test_eof33: cs = 33; goto _test_eof;
|
1234
|
-
_test_eof34: cs = 34; goto _test_eof;
|
1235
|
-
_test_eof35: cs = 35; goto _test_eof;
|
1236
|
-
_test_eof36: cs = 36; goto _test_eof;
|
1237
|
-
_test_eof37: cs = 37; goto _test_eof;
|
1238
|
-
_test_eof38: cs = 38; goto _test_eof;
|
1239
|
-
_test_eof39: cs = 39; goto _test_eof;
|
1240
|
-
_test_eof40: cs = 40; goto _test_eof;
|
1241
|
-
_test_eof41: cs = 41; goto _test_eof;
|
1242
|
-
_test_eof42: cs = 42; goto _test_eof;
|
1243
|
-
_test_eof43: cs = 43; goto _test_eof;
|
1244
|
-
_test_eof44: cs = 44; goto _test_eof;
|
1245
|
-
_test_eof45: cs = 45; goto _test_eof;
|
1246
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1247
|
-
_test_eof47: cs = 47; goto _test_eof;
|
1248
|
-
_test_eof48: cs = 48; goto _test_eof;
|
1249
|
-
_test_eof49: cs = 49; goto _test_eof;
|
1250
|
-
_test_eof50: cs = 50; goto _test_eof;
|
1251
|
-
_test_eof51: cs = 51; goto _test_eof;
|
1252
|
-
_test_eof52: cs = 52; goto _test_eof;
|
1253
|
-
_test_eof53: cs = 53; goto _test_eof;
|
1254
|
-
_test_eof54: cs = 54; goto _test_eof;
|
1255
|
-
_test_eof55: cs = 55; goto _test_eof;
|
1256
|
-
_test_eof56: cs = 56; goto _test_eof;
|
1257
|
-
_test_eof57: cs = 57; goto _test_eof;
|
1258
|
-
_test_eof58: cs = 58; goto _test_eof;
|
1259
|
-
_test_eof59: cs = 59; goto _test_eof;
|
1260
|
-
_test_eof60: cs = 60; goto _test_eof;
|
1261
|
-
_test_eof61: cs = 61; goto _test_eof;
|
1262
|
-
_test_eof62: cs = 62; goto _test_eof;
|
1263
|
-
|
1264
|
-
_test_eof: {}
|
1265
|
-
_out: {}
|
1266
|
-
}
|
1267
|
-
|
1268
|
-
#line 138 "unicorn_http.rl"
|
1269
|
-
|
1270
|
-
if (!http_parser_has_error(parser))
|
1271
|
-
parser->cs = cs;
|
1272
|
-
parser->nread += p - (buffer + off);
|
1273
|
-
|
1274
|
-
assert(p <= pe && "buffer overflow after parsing execute");
|
1275
|
-
assert(parser->nread <= len && "nread longer than length");
|
1276
|
-
assert(parser->body_start <= len && "body starts after buffer end");
|
1277
|
-
assert(parser->mark < len && "mark is after buffer end");
|
1278
|
-
assert(parser->field_len <= len && "field has length longer than whole buffer");
|
1279
|
-
assert(parser->field_start < len && "field starts after buffer end");
|
1280
|
-
}
|
1281
|
-
|
1282
|
-
static int http_parser_has_error(http_parser *parser) {
|
1283
|
-
return parser->cs == http_parser_error;
|
1284
|
-
}
|
1285
|
-
|
1286
|
-
static int http_parser_is_finished(http_parser *parser) {
|
1287
|
-
return parser->cs == http_parser_first_final;
|
1288
|
-
}
|
1289
|
-
#endif /* unicorn_http_h */
|