unicorn 0.91.0 → 0.92.0
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/{CHANGELOG → .CHANGELOG.old} +0 -0
- data/.document +4 -0
- data/.gitignore +5 -0
- data/.mailmap +26 -0
- data/CONTRIBUTORS +1 -1
- data/Documentation/.gitignore +5 -0
- data/Documentation/GNUmakefile +30 -0
- data/Documentation/unicorn.1.txt +158 -0
- data/Documentation/unicorn_rails.1.txt +150 -0
- data/GIT-VERSION-GEN +40 -0
- data/GNUmakefile +102 -14
- data/README +3 -2
- data/Rakefile +104 -32
- data/SIGNALS +2 -4
- data/TODO +3 -9
- data/bin/unicorn +5 -2
- data/bin/unicorn_rails +5 -3
- data/ext/unicorn_http/c_util.h +2 -2
- data/ext/unicorn_http/common_field_optimization.h +2 -1
- data/ext/unicorn_http/ext_help.h +29 -4
- data/ext/unicorn_http/extconf.rb +5 -0
- data/ext/unicorn_http/unicorn_http.rl +131 -76
- data/lib/unicorn.rb +6 -2
- data/lib/unicorn/app/exec_cgi.rb +3 -1
- data/lib/unicorn/app/inetd.rb +2 -0
- data/lib/unicorn/app/old_rails.rb +2 -0
- data/lib/unicorn/app/old_rails/static.rb +3 -1
- data/lib/unicorn/cgi_wrapper.rb +3 -1
- data/lib/unicorn/configurator.rb +2 -0
- data/lib/unicorn/const.rb +8 -6
- data/lib/unicorn/http_request.rb +6 -5
- data/lib/unicorn/http_response.rb +4 -2
- data/lib/unicorn/launcher.rb +6 -0
- data/lib/unicorn/socket_helper.rb +5 -5
- data/lib/unicorn/tee_input.rb +2 -0
- data/lib/unicorn/util.rb +2 -0
- data/local.mk.sample +4 -2
- data/setup.rb +1 -0
- data/test/aggregate.rb +2 -0
- data/test/exec/test_exec.rb +157 -0
- data/test/rails/app-1.2.3/app/controllers/application.rb +2 -0
- data/test/rails/app-1.2.3/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-1.2.3/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-1.2.3/config/boot.rb +2 -0
- data/test/rails/app-1.2.3/config/environment.rb +2 -0
- data/test/rails/app-1.2.3/config/environments/development.rb +2 -0
- data/test/rails/app-1.2.3/config/environments/production.rb +2 -0
- data/test/rails/app-1.2.3/config/routes.rb +2 -0
- data/test/rails/app-2.0.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.0.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.0.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.0.2/config/boot.rb +2 -0
- data/test/rails/app-2.0.2/config/environment.rb +2 -0
- data/test/rails/app-2.0.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.0.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.0.2/config/routes.rb +2 -0
- data/test/rails/app-2.1.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.1.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.1.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.1.2/config/boot.rb +2 -0
- data/test/rails/app-2.1.2/config/environment.rb +2 -0
- data/test/rails/app-2.1.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.1.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.1.2/config/routes.rb +2 -0
- data/test/rails/app-2.2.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.2.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.2.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.2.2/config/boot.rb +2 -0
- data/test/rails/app-2.2.2/config/environment.rb +2 -0
- data/test/rails/app-2.2.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.2.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.2.2/config/routes.rb +2 -0
- data/test/rails/app-2.3.3.1/app/controllers/application_controller.rb +2 -0
- data/test/rails/app-2.3.3.1/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.3.3.1/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.3.3.1/config/boot.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environment.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environments/development.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environments/production.rb +2 -0
- data/test/rails/app-2.3.3.1/config/routes.rb +2 -0
- data/test/rails/test_rails.rb +2 -0
- data/test/test_helper.rb +8 -0
- data/test/unit/test_configurator.rb +2 -0
- data/test/unit/test_http_parser.rb +13 -0
- data/test/unit/test_http_parser_ng.rb +2 -0
- data/test/unit/test_request.rb +2 -0
- data/test/unit/test_response.rb +2 -0
- data/test/unit/test_server.rb +2 -0
- data/test/unit/test_signals.rb +2 -0
- data/test/unit/test_socket_helper.rb +2 -0
- data/test/unit/test_tee_input.rb +2 -1
- data/test/unit/test_upload.rb +2 -0
- data/test/unit/test_util.rb +2 -0
- data/unicorn.gemspec +38 -28
- metadata +38 -42
- data/Manifest +0 -137
data/test/rails/test_rails.rb
CHANGED
data/test/test_helper.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# -*- encoding: binary -*-
|
|
2
|
+
|
|
1
3
|
# Copyright (c) 2005 Zed A. Shaw
|
|
2
4
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
|
3
5
|
#
|
|
@@ -102,6 +104,12 @@ def unused_port(addr = '127.0.0.1')
|
|
|
102
104
|
begin
|
|
103
105
|
begin
|
|
104
106
|
port = base + rand(32768 - base)
|
|
107
|
+
if addr == Unicorn::Const::DEFAULT_HOST
|
|
108
|
+
while port == Unicorn::Const::DEFAULT_PORT
|
|
109
|
+
port = base + rand(32768 - base)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
105
113
|
sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
|
106
114
|
sock.bind(Socket.pack_sockaddr_in(port, addr))
|
|
107
115
|
sock.listen(5)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# -*- encoding: binary -*-
|
|
2
|
+
|
|
1
3
|
# Copyright (c) 2005 Zed A. Shaw
|
|
2
4
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
|
3
5
|
#
|
|
@@ -180,6 +182,17 @@ class HttpParserTest < Test::Unit::TestCase
|
|
|
180
182
|
assert_equal 'hi y x ASDF', req['HTTP_X_ASDF']
|
|
181
183
|
end
|
|
182
184
|
|
|
185
|
+
def test_continuation_with_absolute_uri_and_ignored_host_header
|
|
186
|
+
parser = HttpParser.new
|
|
187
|
+
header = "GET http://example.com/ HTTP/1.1\r\n" \
|
|
188
|
+
"Host: \r\n" \
|
|
189
|
+
" YHBT.net\r\n" \
|
|
190
|
+
"\r\n"
|
|
191
|
+
req = {}
|
|
192
|
+
assert_equal req, parser.headers(req, header)
|
|
193
|
+
assert_equal 'example.com', req['HTTP_HOST']
|
|
194
|
+
end
|
|
195
|
+
|
|
183
196
|
# this may seem to be testing more of an implementation detail, but
|
|
184
197
|
# it also helps ensure we're safe in the presence of multiple parsers
|
|
185
198
|
# in case we ever go multithreaded/evented...
|
data/test/unit/test_request.rb
CHANGED
data/test/unit/test_response.rb
CHANGED
data/test/unit/test_server.rb
CHANGED
data/test/unit/test_signals.rb
CHANGED
data/test/unit/test_tee_input.rb
CHANGED
data/test/unit/test_upload.rb
CHANGED
data/test/unit/test_util.rb
CHANGED
data/unicorn.gemspec
CHANGED
|
@@ -1,36 +1,46 @@
|
|
|
1
|
-
# -*- encoding:
|
|
1
|
+
# -*- encoding: binary -*-
|
|
2
|
+
|
|
3
|
+
ENV["VERSION"] or abort "VERSION= must be specified"
|
|
4
|
+
manifest = File.readlines('.manifest').map! { |x| x.chomp! }
|
|
2
5
|
|
|
3
6
|
Gem::Specification.new do |s|
|
|
4
7
|
s.name = %q{unicorn}
|
|
5
|
-
s.version = "
|
|
8
|
+
s.version = ENV["VERSION"]
|
|
6
9
|
|
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
10
|
s.authors = ["Eric Wong"]
|
|
9
|
-
s.date = %
|
|
10
|
-
|
|
11
|
-
s.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
s.
|
|
18
|
-
s.
|
|
19
|
-
s.
|
|
20
|
-
|
|
21
|
-
s.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
29
|
-
s.add_runtime_dependency(%q<rack>, [">= 0"])
|
|
11
|
+
s.date = Time.now.utc.strftime('%Y-%m-%d')
|
|
12
|
+
|
|
13
|
+
s.description = %q{
|
|
14
|
+
HTTP server for Rack applications designed to take advantage of features
|
|
15
|
+
in Unix/Unix-like operating systems and serve low-latency, high-bandwidth
|
|
16
|
+
clients (such as a buffering reverse proxy server).
|
|
17
|
+
}.strip
|
|
18
|
+
|
|
19
|
+
s.email = %q{mongrel-unicorn@rubyforge.org}
|
|
20
|
+
s.executables = %w(unicorn unicorn_rails)
|
|
21
|
+
s.extensions = %w(ext/unicorn_http/extconf.rb)
|
|
22
|
+
|
|
23
|
+
s.extra_rdoc_files = File.readlines('.document').map! do |x|
|
|
24
|
+
x.chomp!
|
|
25
|
+
if File.directory?(x)
|
|
26
|
+
manifest.grep(%r{\A#{x}/})
|
|
27
|
+
elsif File.file?(x)
|
|
28
|
+
x
|
|
30
29
|
else
|
|
31
|
-
|
|
30
|
+
nil
|
|
32
31
|
end
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
end.flatten.compact
|
|
33
|
+
|
|
34
|
+
s.files = manifest
|
|
35
|
+
s.homepage = %q{http://unicorn.bogomips.org/}
|
|
36
|
+
|
|
37
|
+
s.rdoc_options = [ "-Na", "-t",
|
|
38
|
+
"Unicorn: Rack HTTP server for Unix and fast clients" ]
|
|
39
|
+
s.require_paths = %w(lib ext)
|
|
40
|
+
s.rubyforge_project = %q{mongrel}
|
|
41
|
+
s.summary = %q{Rack HTTP server for Unix and fast clients}
|
|
42
|
+
s.test_files = manifest.grep(%r{\Atest/unit/test_*\.rb\z})
|
|
43
|
+
|
|
44
|
+
s.add_dependency(%q<rack>)
|
|
45
|
+
s.licenses = %w(GPLv2 Ruby)
|
|
36
46
|
end
|
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.92.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-09-
|
|
12
|
+
date: 2009-09-18 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -22,29 +22,27 @@ dependencies:
|
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
23
|
version: "0"
|
|
24
24
|
version:
|
|
25
|
-
description:
|
|
26
|
-
|
|
25
|
+
description: |-
|
|
26
|
+
HTTP server for Rack applications designed to take advantage of features
|
|
27
|
+
in Unix/Unix-like operating systems and serve low-latency, high-bandwidth
|
|
28
|
+
clients (such as a buffering reverse proxy server).
|
|
29
|
+
email: mongrel-unicorn@rubyforge.org
|
|
27
30
|
executables:
|
|
28
31
|
- unicorn
|
|
29
32
|
- unicorn_rails
|
|
30
33
|
extensions:
|
|
31
34
|
- ext/unicorn_http/extconf.rb
|
|
32
35
|
extra_rdoc_files:
|
|
33
|
-
- CHANGELOG
|
|
34
|
-
- COPYING
|
|
35
|
-
- LICENSE
|
|
36
36
|
- README
|
|
37
|
+
- TUNING
|
|
38
|
+
- PHILOSOPHY
|
|
39
|
+
- DESIGN
|
|
40
|
+
- CONTRIBUTORS
|
|
41
|
+
- LICENSE
|
|
42
|
+
- SIGNALS
|
|
37
43
|
- TODO
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- ext/unicorn_http/c_util.h
|
|
41
|
-
- ext/unicorn_http/common_field_optimization.h
|
|
42
|
-
- ext/unicorn_http/ext_help.h
|
|
43
|
-
- ext/unicorn_http/extconf.rb
|
|
44
|
-
- ext/unicorn_http/global_variables.h
|
|
45
|
-
- ext/unicorn_http/unicorn_http.c
|
|
46
|
-
- ext/unicorn_http/unicorn_http.rl
|
|
47
|
-
- ext/unicorn_http/unicorn_http_common.rl
|
|
44
|
+
- NEWS
|
|
45
|
+
- ChangeLog
|
|
48
46
|
- lib/unicorn.rb
|
|
49
47
|
- lib/unicorn/app/exec_cgi.rb
|
|
50
48
|
- lib/unicorn/app/inetd.rb
|
|
@@ -59,16 +57,26 @@ extra_rdoc_files:
|
|
|
59
57
|
- lib/unicorn/socket_helper.rb
|
|
60
58
|
- lib/unicorn/tee_input.rb
|
|
61
59
|
- lib/unicorn/util.rb
|
|
60
|
+
- ext/unicorn_http/unicorn_http.c
|
|
62
61
|
files:
|
|
62
|
+
- .CHANGELOG.old
|
|
63
63
|
- .document
|
|
64
64
|
- .gitignore
|
|
65
|
-
-
|
|
65
|
+
- .mailmap
|
|
66
|
+
- .manifest
|
|
66
67
|
- CONTRIBUTORS
|
|
67
68
|
- COPYING
|
|
69
|
+
- ChangeLog
|
|
68
70
|
- DESIGN
|
|
71
|
+
- Documentation/.gitignore
|
|
72
|
+
- Documentation/GNUmakefile
|
|
73
|
+
- Documentation/unicorn.1.txt
|
|
74
|
+
- Documentation/unicorn_rails.1.txt
|
|
75
|
+
- GIT-VERSION-FILE
|
|
76
|
+
- GIT-VERSION-GEN
|
|
69
77
|
- GNUmakefile
|
|
70
78
|
- LICENSE
|
|
71
|
-
-
|
|
79
|
+
- NEWS
|
|
72
80
|
- PHILOSOPHY
|
|
73
81
|
- README
|
|
74
82
|
- Rakefile
|
|
@@ -200,16 +208,14 @@ files:
|
|
|
200
208
|
- unicorn.gemspec
|
|
201
209
|
has_rdoc: true
|
|
202
210
|
homepage: http://unicorn.bogomips.org/
|
|
203
|
-
licenses:
|
|
204
|
-
|
|
211
|
+
licenses:
|
|
212
|
+
- GPLv2
|
|
213
|
+
- Ruby
|
|
205
214
|
post_install_message:
|
|
206
215
|
rdoc_options:
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- Unicorn
|
|
211
|
-
- --main
|
|
212
|
-
- README
|
|
216
|
+
- -Na
|
|
217
|
+
- -t
|
|
218
|
+
- "Unicorn: Rack HTTP server for Unix and fast clients"
|
|
213
219
|
require_paths:
|
|
214
220
|
- lib
|
|
215
221
|
- ext
|
|
@@ -223,24 +229,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
223
229
|
requirements:
|
|
224
230
|
- - ">="
|
|
225
231
|
- !ruby/object:Gem::Version
|
|
226
|
-
version: "
|
|
232
|
+
version: "0"
|
|
227
233
|
version:
|
|
228
234
|
requirements: []
|
|
229
235
|
|
|
230
|
-
rubyforge_project:
|
|
236
|
+
rubyforge_project: mongrel
|
|
231
237
|
rubygems_version: 1.3.5
|
|
232
238
|
signing_key:
|
|
233
239
|
specification_version: 3
|
|
234
|
-
summary: Rack HTTP server for Unix
|
|
235
|
-
test_files:
|
|
236
|
-
|
|
237
|
-
- test/unit/test_response.rb
|
|
238
|
-
- test/unit/test_request.rb
|
|
239
|
-
- test/unit/test_signals.rb
|
|
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
|
|
244
|
-
- test/unit/test_socket_helper.rb
|
|
245
|
-
- test/unit/test_util.rb
|
|
246
|
-
- test/unit/test_server.rb
|
|
240
|
+
summary: Rack HTTP server for Unix and fast clients
|
|
241
|
+
test_files: []
|
|
242
|
+
|