unicorn 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0f63df97befc889520fdfd69aa7e8acc52e6a98
4
- data.tar.gz: a09d9d5c31dffbb73b43675496545ab22a67af2e
3
+ metadata.gz: 277fcaa980e2e0c38def0c8d5d2a62de55ad659d
4
+ data.tar.gz: 315f01cb5df3ab7c606cc7071f457431161a34fb
5
5
  SHA512:
6
- metadata.gz: 01bcc9ba08ff53c1649de5939d8c3b8ec96d6bfc6bf4b95c1e50d4017c316eaacfd332ddf90409c2225298e4540cbaddc167d12c96c960bf78934691978167cb
7
- data.tar.gz: 9601aa0700f3597941f38740274fcba8cd7c5835741e64611dbace52609be533f78328f6336ce5813ed0e96a853f8946d19b55321880acd07bcdd3f5048b2d75
6
+ metadata.gz: 81284810b2b5fa7575737c865ced8e90491a22e24db092a15f381da8a802608e12c5c9a7beea5d99603cd2c167fb5ea5d937708b26c1e28f66ee80980a06b7ae
7
+ data.tar.gz: 4ca0c767edc69c6e93b5b58329266ac81234ff1da9b4640a1c19bc97f3a3e9d8911727205e47a4ad1a89c328042096bd213a85a367717687e9adc715f635810b
@@ -0,0 +1,5 @@
1
+ *.gemspec diff=ruby
2
+ *.rb diff=ruby
3
+ *.ru diff=ruby
4
+ Rakefile diff=ruby
5
+ bin/* diff=ruby
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- DEF_VER = "v5.0.0"
2
+ DEF_VER = "v5.0.1"
3
3
  CONSTANT = "Unicorn::Const::UNICORN_VERSION"
4
4
  RVF = "lib/unicorn/version.rb"
5
5
  GVF = "GIT-VERSION-FILE"
@@ -0,0 +1,11 @@
1
+ # ==> /etc/systemd/system/unicorn.socket <==
2
+ [Unit]
3
+ Description = unicorn sockets
4
+
5
+ [Socket]
6
+ ListenStream = 127.0.0.1:8080
7
+ ListenStream = /tmp/path/to/.unicorn.sock
8
+ Service = unicorn@1.service
9
+
10
+ [Install]
11
+ WantedBy = sockets.target
@@ -0,0 +1,26 @@
1
+ # ==> /etc/systemd/system/unicorn@.service <==
2
+ # Since SIGUSR2 upgrades do not work under systemd, this service file
3
+ # allows starting two simultaneous services during upgrade time
4
+ # (e.g. unicorn@1 unicorn@2) with the intention that they take
5
+ # turns running in-between upgrades. This should allow upgrading
6
+ # without downtime.
7
+
8
+ [Unit]
9
+ Description = unicorn Rack application server %i
10
+ Wants = unicorn.socket
11
+ After = unicorn.socket
12
+
13
+ [Service]
14
+ ExecStart = /usr/bin/unicorn -c /path/to/unicorn.conf.rb /path/to/config.ru
15
+ Sockets = unicorn.socket
16
+ KillSignal = SIGQUIT
17
+ User = nobody
18
+ Group = nogroup
19
+ ExecReload = /bin/kill -HUP $MAINPID
20
+
21
+ # This is based on the Unicorn::Configurator#timeout directive,
22
+ # adding a few seconds for scheduling differences:
23
+ TimeoutStopSec = 62
24
+
25
+ [Install]
26
+ WantedBy = multi-user.target
@@ -37,7 +37,7 @@ def http_response_write(socket, status, headers, body,
37
37
  # key in Rack < 1.5
38
38
  hijack = value
39
39
  else
40
- if value.include?("\n".freeze)
40
+ if value =~ /\n/
41
41
  # avoiding blank, key-only cookies with /\n+/
42
42
  value.split(/\n+/).each { |v| buf << "#{key}: #{v}\r\n" }
43
43
  else
@@ -33,6 +33,15 @@ def test_response_headers
33
33
  assert out.length > 0, "output didn't have data"
34
34
  end
35
35
 
36
+ # ref: <CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com>
37
+ def test_response_header_broken_nil
38
+ out = StringIO.new
39
+ http_response_write(out, 200, {"Nil" => nil}, %w(hysterical raisin))
40
+ assert ! out.closed?
41
+
42
+ assert_match %r{^Nil: \r\n}sm, out.string, 'nil accepted'
43
+ end
44
+
36
45
  def test_response_string_status
37
46
  out = StringIO.new
38
47
  http_response_write(out,'200', {}, [])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - unicorn hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-01 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -124,6 +124,7 @@ extra_rdoc_files:
124
124
  files:
125
125
  - ".CHANGELOG.old"
126
126
  - ".document"
127
+ - ".gitattributes"
127
128
  - ".gitignore"
128
129
  - ".mailmap"
129
130
  - ".manifest"
@@ -166,6 +167,8 @@ files:
166
167
  - examples/nginx.conf
167
168
  - examples/unicorn.conf.minimal.rb
168
169
  - examples/unicorn.conf.rb
170
+ - examples/unicorn.socket
171
+ - examples/unicorn@.service
169
172
  - ext/unicorn_http/CFLAGS
170
173
  - ext/unicorn_http/c_util.h
171
174
  - ext/unicorn_http/common_field_optimization.h