unicorn 3.4.0 → 3.5.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/GIT-VERSION-GEN +1 -1
- data/KNOWN_ISSUES +4 -0
- data/README +3 -3
- data/lib/unicorn/app/exec_cgi.rb +1 -1
- data/lib/unicorn/app/inetd.rb +1 -1
- data/lib/unicorn/http_server.rb +1 -1
- data/lib/unicorn/oob_gc.rb +2 -2
- data/lib/unicorn/stream_input.rb +1 -1
- data/lib/unicorn/tee_input.rb +0 -1
- data/script/isolate_for_tests +1 -1
- data/t/bin/unused_listen +15 -2
- data/test/test_helper.rb +16 -3
- data/unicorn.gemspec +1 -2
- metadata +9 -10
data/GIT-VERSION-GEN
CHANGED
data/KNOWN_ISSUES
CHANGED
@@ -8,6 +8,10 @@ acceptable solution. Those issues are documented here.
|
|
8
8
|
|
9
9
|
See http://redmine.ruby-lang.org/issues/show/4338
|
10
10
|
|
11
|
+
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
12
|
+
stdio that causes failure for file uploads larger than 112K. Upgrade
|
13
|
+
your version of Ruby or continue using Unicorn 1.x/3.4.x.
|
14
|
+
|
11
15
|
* For notes on sandboxing tools such as Bundler or Isolate,
|
12
16
|
see the {Sandbox}[link:Sandbox.html] page.
|
13
17
|
|
data/README
CHANGED
@@ -60,11 +60,11 @@ both the the request and response in between \Unicorn and slow clients.
|
|
60
60
|
== License
|
61
61
|
|
62
62
|
\Unicorn is copyright 2009 by all contributors (see logs in git).
|
63
|
-
It is based on Mongrel and carries the same license.
|
63
|
+
It is based on Mongrel 1.1.5 and carries the same license.
|
64
64
|
|
65
65
|
Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
|
66
|
-
under the Ruby license and the GPL2. See the included LICENSE file
|
67
|
-
details.
|
66
|
+
under the Ruby (1.8) license and the GPL2. See the included LICENSE file
|
67
|
+
for details.
|
68
68
|
|
69
69
|
\Unicorn is 100% Free Software.
|
70
70
|
|
data/lib/unicorn/app/exec_cgi.rb
CHANGED
data/lib/unicorn/app/inetd.rb
CHANGED
data/lib/unicorn/http_server.rb
CHANGED
@@ -582,7 +582,7 @@ class Unicorn::HttpServer
|
|
582
582
|
|
583
583
|
# closing anything we IO.select on will raise EBADF
|
584
584
|
trap(:USR1) { nr = -65536; SELF_PIPE[0].close rescue nil }
|
585
|
-
trap(:QUIT) { alive = nil; LISTENERS.each { |s| s.close rescue nil } }
|
585
|
+
trap(:QUIT) { alive = nil; LISTENERS.each { |s| s.close rescue nil }.clear }
|
586
586
|
[:TERM, :INT].each { |sig| trap(sig) { exit!(0) } } # instant shutdown
|
587
587
|
logger.info "worker=#{worker.nr} ready"
|
588
588
|
m = 0
|
data/lib/unicorn/oob_gc.rb
CHANGED
data/lib/unicorn/stream_input.rb
CHANGED
data/lib/unicorn/tee_input.rb
CHANGED
data/script/isolate_for_tests
CHANGED
data/t/bin/unused_listen
CHANGED
@@ -7,11 +7,24 @@ require 'tmpdir'
|
|
7
7
|
|
8
8
|
default_port = 8080
|
9
9
|
addr = ENV['UNICORN_TEST_ADDR'] || '127.0.0.1'
|
10
|
+
retries = 100
|
11
|
+
base = 5000
|
10
12
|
port = sock = lock_path = nil
|
11
13
|
|
12
14
|
begin
|
13
|
-
|
14
|
-
|
15
|
+
begin
|
16
|
+
port = base + rand(32768 - base)
|
17
|
+
while port == default_port
|
18
|
+
port = base + rand(32768 - base)
|
19
|
+
end
|
20
|
+
|
21
|
+
sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
22
|
+
sock.bind(Socket.pack_sockaddr_in(port, addr))
|
23
|
+
sock.listen(5)
|
24
|
+
rescue Errno::EADDRINUSE, Errno::EACCES
|
25
|
+
sock.close rescue nil
|
26
|
+
retry if (retries -= 1) >= 0
|
27
|
+
end
|
15
28
|
|
16
29
|
# since we'll end up closing the random port we just got, there's a race
|
17
30
|
# condition could allow the random port we just chose to reselect itself
|
data/test/test_helper.rb
CHANGED
@@ -100,17 +100,30 @@ end
|
|
100
100
|
# for a race condition is very small). You may also set UNICORN_TEST_ADDR
|
101
101
|
# to override the default test address (127.0.0.1).
|
102
102
|
def unused_port(addr = '127.0.0.1')
|
103
|
+
retries = 100
|
104
|
+
base = 5000
|
103
105
|
port = sock = nil
|
104
106
|
begin
|
105
|
-
|
106
|
-
|
107
|
+
begin
|
108
|
+
port = base + rand(32768 - base)
|
109
|
+
while port == Unicorn::Const::DEFAULT_PORT
|
110
|
+
port = base + rand(32768 - base)
|
111
|
+
end
|
112
|
+
|
113
|
+
sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
114
|
+
sock.bind(Socket.pack_sockaddr_in(port, addr))
|
115
|
+
sock.listen(5)
|
116
|
+
rescue Errno::EADDRINUSE, Errno::EACCES
|
117
|
+
sock.close rescue nil
|
118
|
+
retry if (retries -= 1) >= 0
|
119
|
+
end
|
107
120
|
|
108
121
|
# since we'll end up closing the random port we just got, there's a race
|
109
122
|
# condition could allow the random port we just chose to reselect itself
|
110
123
|
# when running tests in parallel with gmake. Create a lock file while
|
111
124
|
# we have the port here to ensure that does not happen .
|
112
125
|
lock_path = "#{Dir::tmpdir}/unicorn_test.#{addr}:#{port}.lock"
|
113
|
-
File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600)
|
126
|
+
File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600).close
|
114
127
|
at_exit { File.unlink(lock_path) rescue nil }
|
115
128
|
rescue Errno::EEXIST
|
116
129
|
sock.close rescue nil
|
data/unicorn.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.files = manifest
|
27
27
|
s.homepage = Wrongdoc.config[:rdoc_url]
|
28
28
|
s.rdoc_options = rdoc_options
|
29
|
-
s.require_paths = %w(lib ext)
|
30
29
|
s.rubyforge_project = %q{mongrel}
|
31
30
|
s.test_files = test_files
|
32
31
|
|
@@ -35,7 +34,7 @@ Gem::Specification.new do |s|
|
|
35
34
|
# commented out. Nevertheless, upgrading to Rails 2.3.4 or later is
|
36
35
|
# *strongly* recommended for security reasons.
|
37
36
|
s.add_dependency(%q<rack>)
|
38
|
-
s.add_dependency(%q<kgio>, '~> 2.
|
37
|
+
s.add_dependency(%q<kgio>, '~> 2.3')
|
39
38
|
|
40
39
|
s.add_development_dependency('isolate', '~> 3.0.0')
|
41
40
|
s.add_development_dependency('wrongdoc', '~> 1.5')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 3.
|
10
|
+
version: 3.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Unicorn hackers
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-15 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -40,11 +40,11 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 5
|
44
44
|
segments:
|
45
45
|
- 2
|
46
|
-
-
|
47
|
-
version: "2.
|
46
|
+
- 3
|
47
|
+
version: "2.3"
|
48
48
|
type: :runtime
|
49
49
|
version_requirements: *id002
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -392,7 +392,6 @@ rdoc_options:
|
|
392
392
|
- http://bogomips.org/unicorn.git/tree/%s
|
393
393
|
require_paths:
|
394
394
|
- lib
|
395
|
-
- ext
|
396
395
|
required_ruby_version: !ruby/object:Gem::Requirement
|
397
396
|
none: false
|
398
397
|
requirements:
|
@@ -414,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
414
413
|
requirements: []
|
415
414
|
|
416
415
|
rubyforge_project: mongrel
|
417
|
-
rubygems_version: 1.
|
416
|
+
rubygems_version: 1.6.1
|
418
417
|
signing_key:
|
419
418
|
specification_version: 3
|
420
419
|
summary: Rack HTTP server for fast clients and Unix
|