unicorn 5.5.2 → 5.5.3

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
  SHA256:
3
- metadata.gz: de6d231854c78743f6e065253eaaea6209b09ad9a09a7153e1c4d9d8eeaedf3d
4
- data.tar.gz: ddf83ee5a57ba96bb18124de1331d7763e019e5c686ced6f4164dd07a9277e68
3
+ metadata.gz: def232de6614b9d1e5394c6a8ebde552a8c5d063ddc04e946478d7dbc3220526
4
+ data.tar.gz: f1dc8153f477d7c81b9be38c0e6b184863d8eb5d6d35779f637f9259e76a1272
5
5
  SHA512:
6
- metadata.gz: 424332fd70af2e67f34c59cc78b374263126e8fd4516477b44ec0fe0ae27f25d3a537a26fb8748d0920d1354001e124906315ff1f8eb06db86ac79b341e4e770
7
- data.tar.gz: 36b3b0adbbfc9ebdf9450cfb928474a7ab6c56bf4f4957a1ad0cfb3ed665ee27b829b5349ec0de2423e8d0bd745c94676192cd48dfe18cfe64abce6ce6a2dbf2
6
+ metadata.gz: 330cd4ce75af35523f2e6bbdee24794f42222d1c14ffabeccc37bfb5d8cd5e4774d940e6528e6fa72b2890c07acc02c4f917458459718794c1709d6cf0aa0493
7
+ data.tar.gz: ecbc2df84176fa9a99522b06dc127fd5d19e78d782f8f027f8f74f25dca841295299ef310698fb7c42f2cee7bb9b3531dbd2331c328dd8e1d358666df6b2a706
@@ -1,8 +1,9 @@
1
1
  ---
2
- cgit_url: https://bogomips.org/unicorn.git
3
- git_url: https://bogomips.org/unicorn.git
4
- rdoc_url: https://bogomips.org/unicorn/
5
- ml_url: https://bogomips.org/unicorn-public/
2
+ cgit_url: https://yhbt.net/unicorn.git
3
+ rdoc_url: https://yhbt.net/unicorn/
4
+ ml_url:
5
+ - https://yhbt.net/unicorn-public/
6
+ - http://ou63pmih66umazou.onion/unicorn-public/
6
7
  merge_html:
7
8
  unicorn_1: Documentation/unicorn.1.html
8
9
  unicorn_rails_1: Documentation/unicorn_rails.1.html
@@ -11,7 +12,11 @@ noindex:
11
12
  - LATEST
12
13
  - TODO
13
14
  - unicorn_rails_1
14
- public_email: unicorn-public@bogomips.org
15
+ public_email: unicorn-public@yhbt.net
15
16
  nntp_url:
16
- - nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
17
- - nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
17
+ - nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
18
+ - nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn
19
+ - nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
20
+ source_code:
21
+ - git clone https://yhbt.net/unicorn.git
22
+ - torsocks git clone http://ou63pmih66umazou.onion/unicorn.git
@@ -154,7 +154,7 @@ TTIN \- increment the number of worker processes by one
154
154
  .IP \[bu] 2
155
155
  TTOU \- decrement the number of worker processes by one
156
156
  .PP
157
- See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
157
+ See the SIGNALS (https://yhbt.net/unicorn/SIGNALS.html) document for
158
158
  full description of all signals used by Unicorn.
159
159
  .SH RACK ENVIRONMENT
160
160
  .PP
@@ -204,11 +204,11 @@ the unicorn config file.
204
204
  \f[I]Rack::Builder\f[] ri/RDoc
205
205
  .IP \[bu] 2
206
206
  \f[I]Unicorn::Configurator\f[] ri/RDoc
207
- .UR https://bogomips.org/unicorn/Unicorn/Configurator.html
207
+ .UR https://yhbt.net/unicorn/Unicorn/Configurator.html
208
208
  .UE
209
209
  .IP \[bu] 2
210
210
  unicorn RDoc
211
- .UR https://bogomips.org/unicorn/
211
+ .UR https://yhbt.net/unicorn/
212
212
  .UE
213
213
  .IP \[bu] 2
214
214
  Rack RDoc
@@ -219,4 +219,4 @@ Rackup HowTo
219
219
  .UR https://github.com/rack/rack/wiki/(tutorial)-rackup-howto
220
220
  .UE
221
221
  .SH AUTHORS
222
- The Unicorn Community <unicorn-public@bogomips.org>.
222
+ The Unicorn Community <unicorn-public@yhbt.net>.
@@ -180,7 +180,7 @@ TTIN \- increment the number of worker processes by one
180
180
  .IP \[bu] 2
181
181
  TTOU \- decrement the number of worker processes by one
182
182
  .PP
183
- See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
183
+ See the SIGNALS (https://yhbt.net/unicorn/SIGNALS.html) document for
184
184
  full description of all signals used by Unicorn.
185
185
  .SH SEE ALSO
186
186
  .IP \[bu] 2
@@ -189,11 +189,11 @@ unicorn(1)
189
189
  \f[I]Rack::Builder\f[] ri/RDoc
190
190
  .IP \[bu] 2
191
191
  \f[I]Unicorn::Configurator\f[] ri/RDoc
192
- .UR https://bogomips.org/unicorn/Unicorn/Configurator.html
192
+ .UR https://yhbt.net/unicorn/Unicorn/Configurator.html
193
193
  .UE
194
194
  .IP \[bu] 2
195
195
  unicorn RDoc
196
- .UR https://bogomips.org/unicorn/
196
+ .UR https://yhbt.net/unicorn/
197
197
  .UE
198
198
  .IP \[bu] 2
199
199
  Rack RDoc
@@ -204,4 +204,4 @@ Rackup HowTo
204
204
  .UR https://github.com/rack/rack/wiki/(tutorial)-rackup-howto
205
205
  .UE
206
206
  .SH AUTHORS
207
- The Unicorn Community <unicorn-public@bogomips.org>.
207
+ The Unicorn Community <unicorn-public@yhbt.net>.
data/FAQ CHANGED
@@ -7,7 +7,7 @@ drained entirely by the application. This may happen when request
7
7
  bodies are gzipped, as unicorn reads request body data lazily to avoid
8
8
  overhead from bad requests.
9
9
 
10
- Ref: https://bogomips.org/unicorn-public/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com/
10
+ Ref: https://yhbt.net/unicorn-public/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com/
11
11
 
12
12
  === Why aren't my Rails log files rotated when I use SIGUSR1?
13
13
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- DEF_VER = "v5.5.2"
2
+ DEF_VER = "v5.5.3"
3
3
  CONSTANT = "Unicorn::Const::UNICORN_VERSION"
4
4
  RVF = "lib/unicorn/version.rb"
5
5
  GVF = "GIT-VERSION-FILE"
@@ -193,13 +193,13 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
193
193
  install -m644 $(man1_paths) doc/
194
194
  tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
195
195
 
196
- # publishes docs to https://bogomips.org/unicorn/
196
+ # publishes docs to https://yhbt.net/unicorn/
197
197
  publish_doc:
198
198
  -git set-file-times
199
199
  $(MAKE) doc
200
200
  $(MAKE) doc_gz
201
201
  chmod 644 $$(find doc -type f)
202
- $(RSYNC) -av doc/ bogomips.org:/srv/bogomips/unicorn/
202
+ $(RSYNC) -av doc/ yhbt.net:/srv/yhbt/unicorn/
203
203
  git ls-files | xargs touch
204
204
 
205
205
  # Create gzip variants of the same timestamp as the original so nginx
data/HACKING CHANGED
@@ -57,7 +57,7 @@ Please wrap documentation at 72 characters-per-line or less (long URLs
57
57
  are exempt) so it is comfortably readable from terminals.
58
58
 
59
59
  When referencing mailing list posts, use
60
- <tt>https://bogomips.org/unicorn-public/$MESSAGE_ID/</tt> if possible
60
+ <tt>https://yhbt.net/unicorn-public/$MESSAGE_ID/</tt> if possible
61
61
  since the Message-ID remains searchable even if a particular site
62
62
  becomes unavailable.
63
63
 
data/ISSUES CHANGED
@@ -1,9 +1,9 @@
1
1
  = Issues
2
2
 
3
- mailto:unicorn-public@bogomips.org is the best place to report bugs,
3
+ mailto:unicorn-public@yhbt.net is the best place to report bugs,
4
4
  submit patches and/or obtain support after you have searched the
5
- {email archives}[https://bogomips.org/unicorn-public/] and
6
- {documentation}[https://bogomips.org/unicorn/].
5
+ {email archives}[https://yhbt.net/unicorn-public/] and
6
+ {documentation}[https://yhbt.net/unicorn/].
7
7
 
8
8
  * No subscription will ever be required to email us
9
9
  * Cc: all participants in a thread or commit, as subscription is optional
@@ -12,12 +12,12 @@ submit patches and/or obtain support after you have searched the
12
12
  * Do not send HTML mail or images,
13
13
  they hurt reader privacy and will be flagged as spam
14
14
  * Anonymous and pseudonymous messages will ALWAYS be welcome
15
- * The email submission port (587) is enabled on the bogomips.org MX:
16
- https://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
15
+ * The email submission port (587) is enabled on the yhbt.net MX:
16
+ https://yhbt.net/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
17
17
 
18
18
  We will never have a centralized or formal bug tracker. Instead we
19
19
  can interoperate with any bug tracker which can Cc: us plain-text to
20
- mailto:unicorn-public@bogomips.org This includes the Debian BTS
20
+ mailto:unicorn-public@yhbt.net This includes the Debian BTS
21
21
  at https://bugs.debian.org/unicorn and possibly others.
22
22
 
23
23
  If your issue is of a sensitive nature or you're just shy in public,
@@ -73,10 +73,10 @@ document distributed with git) on guidelines for patch submission.
73
73
 
74
74
  == Contact Info
75
75
 
76
- * public: mailto:unicorn-public@bogomips.org
77
- * nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
76
+ * public: mailto:unicorn-public@yhbt.net
77
+ * nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
78
78
  * nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
79
- * https://bogomips.org/unicorn-public/
79
+ * https://yhbt.net/unicorn-public/
80
80
  * http://ou63pmih66umazou.onion/unicorn-public/
81
81
 
82
82
  Mailing list subscription is optional, so Cc: all participants.
@@ -84,13 +84,13 @@ Mailing list subscription is optional, so Cc: all participants.
84
84
  You can follow along via NNTP (read-only):
85
85
 
86
86
  nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
87
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
87
+ nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
88
88
 
89
89
  Or Atom feeds:
90
90
 
91
- https://bogomips.org/unicorn-public/new.atom
91
+ https://yhbt.net/unicorn-public/new.atom
92
92
  http://ou63pmih66umazou.onion/unicorn-public/new.atom
93
93
 
94
- The HTML archives at https://bogomips.org/unicorn-public/
94
+ The HTML archives at https://yhbt.net/unicorn-public/
95
95
  also has links to per-thread Atom feeds and downloadable
96
96
  mboxes.
@@ -9,7 +9,7 @@ acceptable solution. Those issues are documented here.
9
9
  handlers.
10
10
 
11
11
  * Issues with FreeBSD jails can be worked around as documented by Tatsuya Ono:
12
- https://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
12
+ https://yhbt.net/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
13
13
 
14
14
  * PRNGs (pseudo-random number generators) loaded before forking
15
15
  (e.g. "preload_app true") may need to have their internal state
@@ -60,7 +60,7 @@ acceptable solution. Those issues are documented here.
60
60
  application to use Rails 2.3.2 and you have no other choice, then
61
61
  you may edit your unicorn gemspec and remove the Rack dependency.
62
62
 
63
- ref: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
63
+ ref: https://yhbt.net/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
64
64
  Note: the workaround described in the article above only made
65
65
  the issue more subtle and we didn't notice them immediately.
66
66
 
data/Links CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  If you're interested in unicorn, you may be interested in some of the projects
4
4
  listed below. If you have any links to add/change/remove, please tell us at
5
- mailto:unicorn-public@bogomips.org!
5
+ mailto:unicorn-public@yhbt.net!
6
6
 
7
7
  == Disclaimer
8
8
 
@@ -23,10 +23,10 @@ or services behind them.
23
23
  * {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
24
24
  manage multiple unicorn instances/applications on a single server
25
25
 
26
- * {raindrops}[https://bogomips.org/raindrops/] - real-time stats for
26
+ * {raindrops}[https://yhbt.net/raindrops/] - real-time stats for
27
27
  preforking Rack servers
28
28
 
29
- * {UnXF}[https://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
29
+ * {UnXF}[https://yhbt.net/unxf/] Un-X-Forward* the Rack environment,
30
30
  useful since unicorn is designed to be deployed behind a reverse proxy.
31
31
 
32
32
  === unicorn is written to work with
@@ -52,7 +52,7 @@ or services behind them.
52
52
  * {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
53
53
  unicorn is based on. A historical archive of the mongrel dev list
54
54
  featuring early discussions of unicorn is available at:
55
- https://bogomips.org/mongrel-devel/
55
+ https://yhbt.net/mongrel-devel/
56
56
 
57
- * {david}[https://bogomips.org/david.git] - a tool to explain why you need
57
+ * {david}[https://yhbt.net/david.git] - a tool to explain why you need
58
58
  nginx in front of unicorn
data/README CHANGED
@@ -80,12 +80,12 @@ You may install it via RubyGems on RubyGems.org:
80
80
  You can get the latest source via git from the following locations
81
81
  (these versions may not be stable):
82
82
 
83
- https://bogomips.org/unicorn.git
83
+ https://yhbt.net/unicorn.git
84
84
  https://repo.or.cz/unicorn.git (mirror)
85
85
 
86
86
  You may browse the code from the web:
87
87
 
88
- * https://bogomips.org/unicorn.git
88
+ * https://yhbt.net/unicorn.git
89
89
  * https://repo.or.cz/w/unicorn.git (gitweb)
90
90
 
91
91
  See the HACKING guide on how to contribute and build prerelease gems
@@ -133,13 +133,13 @@ and libraries which run on top of it.
133
133
 
134
134
  All feedback (bug reports, user/development dicussion, patches, pull
135
135
  requests) go to the mailing list/newsgroup. See the ISSUES document for
136
- information on the {mailing list}[mailto:unicorn-public@bogomips.org].
136
+ information on the {mailing list}[mailto:unicorn-public@yhbt.net].
137
137
 
138
- The mailing list is archived at https://bogomips.org/unicorn-public/
138
+ The mailing list is archived at https://yhbt.net/unicorn-public/
139
139
  Read-only NNTP access is available at:
140
140
  nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn and
141
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
141
+ nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
142
142
 
143
143
  For the latest on unicorn releases, you may also finger us at
144
- unicorn@bogomips.org or check our NEWS page (and subscribe to our Atom
144
+ unicorn@yhbt.net or check our NEWS page (and subscribe to our Atom
145
145
  feed).
data/SIGNALS CHANGED
@@ -8,7 +8,7 @@ should be possible to easily share process management scripts between
8
8
  Unicorn and nginx.
9
9
 
10
10
  One example init script is distributed with unicorn:
11
- https://bogomips.org/unicorn/examples/init.sh
11
+ https://yhbt.net/unicorn/examples/init.sh
12
12
 
13
13
  === Master Process
14
14
 
data/Sandbox CHANGED
@@ -34,7 +34,7 @@ is the primary issue with sandboxing tools such as Bundler and Isolate.
34
34
  If you're bundling unicorn, use "bundle exec unicorn" (or "bundle exec
35
35
  unicorn_rails") to start unicorn with the correct environment variables
36
36
 
37
- ref: https://bogomips.org/unicorn-public/9ECF07C4-5216-47BE-961D-AFC0F0C82060@internetfamo.us/
37
+ ref: https://yhbt.net/unicorn-public/9ECF07C4-5216-47BE-961D-AFC0F0C82060@internetfamo.us/
38
38
 
39
39
  Otherwise (if you choose to not sandbox your unicorn installation), we
40
40
  expect the tips for Isolate (below) apply, too.
@@ -44,7 +44,7 @@ expect the tips for Isolate (below) apply, too.
44
44
  This is no longer be an issue as of bundler 0.9.17
45
45
 
46
46
  ref:
47
- https://bogomips.org/unicorn-public/8FC34B23-5994-41CC-B5AF-7198EF06909E@tramchase.com/
47
+ https://yhbt.net/unicorn-public/8FC34B23-5994-41CC-B5AF-7198EF06909E@tramchase.com/
48
48
 
49
49
  === BUNDLE_GEMFILE for Capistrano users
50
50
 
@@ -1,4 +1,4 @@
1
1
  # group_name max expire headers_only
2
2
  gmane.comp.lang.ruby.unicorn.general 1000000000 1000000000 0
3
3
 
4
- # usage: slrnpull -d $PWD -h news.gmane.org --no-post
4
+ # usage: slrnpull -d $PWD -h news.gmane.io --no-post
@@ -1,2 +1,2 @@
1
- # see {Unicorn::OobGC}[https://bogomips.org/unicorn/Unicorn/OobGC.html]
1
+ # see {Unicorn::OobGC}[https://yhbt.net/unicorn/Unicorn/OobGC.html]
2
2
  # Unicorn::OobGC was broken in Unicorn v3.3.1 - v3.6.1 and fixed in v3.6.2
@@ -5,7 +5,7 @@
5
5
  # https://linux.die.net/man/8/logrotate
6
6
  #
7
7
  # public logrotate-related discussion in our archives:
8
- # https://bogomips.org/unicorn-public/?q=logrotate
8
+ # https://yhbt.net/unicorn-public/?q=logrotate
9
9
 
10
10
  # Modify the following glob to match the logfiles your app writes to:
11
11
  /var/log/unicorn_app/*.log {
@@ -33,7 +33,7 @@
33
33
  systemctl kill -s SIGUSR1 unicorn@2.service
34
34
 
35
35
  # Examples for other process management systems appreciated
36
- # Mail us at unicorn-public@bogomips.org
36
+ # Mail us at unicorn-public@yhbt.net
37
37
  # (see above for archives)
38
38
 
39
39
  # If you use a pid file and assuming your pid file
@@ -113,7 +113,7 @@ http {
113
113
  # try_files directive appeared in in nginx 0.7.27 and has stabilized
114
114
  # over time. Older versions of nginx (e.g. 0.6.x) requires
115
115
  # "if (!-f $request_filename)" which was less efficient:
116
- # https://bogomips.org/unicorn.git/tree/examples/nginx.conf?id=v3.3.1#n127
116
+ # https://yhbt.net/unicorn.git/tree/examples/nginx.conf?id=v3.3.1#n127
117
117
  try_files $uri/index.html $uri.html $uri @app;
118
118
 
119
119
  location @app {
@@ -1,9 +1,9 @@
1
1
  # Minimal sample configuration file for Unicorn (not Rack) when used
2
2
  # with daemonization (unicorn -D) started in your working directory.
3
3
  #
4
- # See https://bogomips.org/unicorn/Unicorn/Configurator.html for complete
4
+ # See https://yhbt.net/unicorn/Unicorn/Configurator.html for complete
5
5
  # documentation.
6
- # See also https://bogomips.org/unicorn/examples/unicorn.conf.rb for
6
+ # See also https://yhbt.net/unicorn/examples/unicorn.conf.rb for
7
7
  # a more verbose configuration using more features.
8
8
 
9
9
  listen 2007 # by default Unicorn listens on port 8080
@@ -2,10 +2,10 @@
2
2
  #
3
3
  # This configuration file documents many features of Unicorn
4
4
  # that may not be needed for some applications. See
5
- # https://bogomips.org/unicorn/examples/unicorn.conf.minimal.rb
5
+ # https://yhbt.net/unicorn/examples/unicorn.conf.minimal.rb
6
6
  # for a much simpler configuration file.
7
7
  #
8
- # See https://bogomips.org/unicorn/Unicorn/Configurator.html for complete
8
+ # See https://yhbt.net/unicorn/Unicorn/Configurator.html for complete
9
9
  # documentation.
10
10
 
11
11
  # Use at least one worker per core if you're on a dedicated server,
@@ -487,7 +487,7 @@ static void set_url_scheme(VALUE env, VALUE *server_port)
487
487
  * and X-Forwarded-Proto handling from this parser? We've had it
488
488
  * forever and nobody has said anything against it, either.
489
489
  * Anyways, please send comments to our public mailing list:
490
- * unicorn-public@bogomips.org (no HTML mail, no subscription necessary)
490
+ * unicorn-public@yhbt.net (no HTML mail, no subscription necessary)
491
491
  */
492
492
  scheme = rb_hash_aref(env, g_http_x_forwarded_ssl);
493
493
  if (!NIL_P(scheme) && STR_CSTR_EQ(scheme, "on")) {
@@ -96,7 +96,7 @@ def self.builder(ru, op)
96
96
 
97
97
  # returns an array of strings representing TCP listen socket addresses
98
98
  # and Unix domain socket paths. This is useful for use with
99
- # Raindrops::Middleware under Linux: https://bogomips.org/raindrops/
99
+ # Raindrops::Middleware under Linux: https://yhbt.net/raindrops/
100
100
  def self.listener_names
101
101
  Unicorn::HttpServer::LISTENERS.map do |io|
102
102
  Unicorn::SocketHelper.sock_name(io)
@@ -3,11 +3,11 @@
3
3
 
4
4
  # Implements a simple DSL for configuring a unicorn server.
5
5
  #
6
- # See https://bogomips.org/unicorn/examples/unicorn.conf.rb and
7
- # https://bogomips.org/unicorn/examples/unicorn.conf.minimal.rb
6
+ # See https://yhbt.net/unicorn/examples/unicorn.conf.rb and
7
+ # https://yhbt.net/unicorn/examples/unicorn.conf.minimal.rb
8
8
  # example configuration files. An example config file for use with
9
9
  # nginx is also available at
10
- # https://bogomips.org/unicorn/examples/nginx.conf
10
+ # https://yhbt.net/unicorn/examples/nginx.conf
11
11
  #
12
12
  # See the link:/TUNING.html document for more information on tuning unicorn.
13
13
  class Unicorn::Configurator
@@ -6,7 +6,7 @@
6
6
  # forked worker children.
7
7
  #
8
8
  # Users do not need to know the internals of this class, but reading the
9
- # {source}[https://bogomips.org/unicorn.git/tree/lib/unicorn/http_server.rb]
9
+ # {source}[https://yhbt.net/unicorn.git/tree/lib/unicorn/http_server.rb]
10
10
  # is education for programmers wishing to learn how unicorn works.
11
11
  # See Unicorn::Configurator for information on how to configure unicorn.
12
12
  class Unicorn::HttpServer
@@ -43,8 +43,8 @@
43
43
  # use Unicorn::OobGC, 2, %r{\A/(?:expensive/foo|more_expensive/foo)}
44
44
  #
45
45
  # Feedback from users of early implementations of this module:
46
- # * https://bogomips.org/unicorn-public/0BFC98E9-072B-47EE-9A70-05478C20141B@lukemelia.com/
47
- # * https://bogomips.org/unicorn-public/AANLkTilUbgdyDv9W1bi-s_W6kq9sOhWfmuYkKLoKGOLj@mail.gmail.com/
46
+ # * https://yhbt.net/unicorn-public/0BFC98E9-072B-47EE-9A70-05478C20141B@lukemelia.com/
47
+ # * https://yhbt.net/unicorn-public/AANLkTilUbgdyDv9W1bi-s_W6kq9sOhWfmuYkKLoKGOLj@mail.gmail.com/
48
48
 
49
49
  module Unicorn::OobGC
50
50
 
@@ -45,8 +45,9 @@ def call(env)
45
45
 
46
46
  COMMON_TMP = Tempfile.new('unicorn_tmp') unless defined?(COMMON_TMP)
47
47
 
48
+ HEAVY_WORKERS = 2
48
49
  HEAVY_CFG = <<-EOS
49
- worker_processes 4
50
+ worker_processes #{HEAVY_WORKERS}
50
51
  timeout 30
51
52
  logger Logger.new('#{COMMON_TMP.path}')
52
53
  before_fork do |server, worker|
@@ -606,6 +607,7 @@ def test_unicorn_config_listen_augments_cli
606
607
  def test_weird_config_settings
607
608
  File.open("config.ru", "wb") { |fp| fp.syswrite(HI) }
608
609
  ucfg = Tempfile.new('unicorn_test_config')
610
+ proc_total = HEAVY_WORKERS + 1 # + 1 for master
609
611
  ucfg.syswrite(HEAVY_CFG)
610
612
  pid = xfork do
611
613
  redirect_test_io do
@@ -616,9 +618,9 @@ def test_weird_config_settings
616
618
  results = retry_hit(["http://#{@addr}:#{@port}/"])
617
619
  assert_equal String, results[0].class
618
620
  wait_master_ready(COMMON_TMP.path)
619
- wait_workers_ready(COMMON_TMP.path, 4)
621
+ wait_workers_ready(COMMON_TMP.path, HEAVY_WORKERS)
620
622
  bf = File.readlines(COMMON_TMP.path).grep(/\bbefore_fork: worker=/)
621
- assert_equal 4, bf.size
623
+ assert_equal HEAVY_WORKERS, bf.size
622
624
  rotate = Tempfile.new('unicorn_rotate')
623
625
 
624
626
  File.rename(COMMON_TMP.path, rotate.path)
@@ -630,20 +632,20 @@ def test_weird_config_settings
630
632
  tries = DEFAULT_TRIES
631
633
  log = File.readlines(rotate.path)
632
634
  while (tries -= 1) > 0 &&
633
- log.grep(/reopening logs\.\.\./).size < 5
635
+ log.grep(/reopening logs\.\.\./).size < proc_total
634
636
  sleep DEFAULT_RES
635
637
  log = File.readlines(rotate.path)
636
638
  end
637
- assert_equal 5, log.grep(/reopening logs\.\.\./).size
639
+ assert_equal proc_total, log.grep(/reopening logs\.\.\./).size
638
640
  assert_equal 0, log.grep(/done reopening logs/).size
639
641
 
640
642
  tries = DEFAULT_TRIES
641
643
  log = File.readlines(COMMON_TMP.path)
642
- while (tries -= 1) > 0 && log.grep(/done reopening logs/).size < 5
644
+ while (tries -= 1) > 0 && log.grep(/done reopening logs/).size < proc_total
643
645
  sleep DEFAULT_RES
644
646
  log = File.readlines(COMMON_TMP.path)
645
647
  end
646
- assert_equal 5, log.grep(/done reopening logs/).size
648
+ assert_equal proc_total, log.grep(/done reopening logs/).size
647
649
  assert_equal 0, log.grep(/reopening logs\.\.\./).size
648
650
 
649
651
  Process.kill(:QUIT, pid)
@@ -265,32 +265,6 @@ def wait_for_death(pid)
265
265
  raise "PID:#{pid} never died!"
266
266
  end
267
267
 
268
- # executes +cmd+ and chunks its STDOUT
269
- def chunked_spawn(stdout, *cmd)
270
- fork {
271
- crd, cwr = IO.pipe
272
- crd.binmode
273
- cwr.binmode
274
- crd.sync = cwr.sync = true
275
-
276
- pid = fork {
277
- STDOUT.reopen(cwr)
278
- crd.close
279
- cwr.close
280
- exec(*cmd)
281
- }
282
- cwr.close
283
- begin
284
- buf = crd.readpartial(16384)
285
- stdout.write("#{'%x' % buf.size}\r\n#{buf}")
286
- rescue EOFError
287
- stdout.write("0\r\n")
288
- pid, status = Process.waitpid(pid)
289
- exit status.exitstatus
290
- end while true
291
- }
292
- end
293
-
294
268
  def reset_sig_handlers
295
269
  %w(WINCH QUIT INT TERM USR1 USR2 HUP TTIN TTOU CHLD).each do |sig|
296
270
  trap(sig, "DEFAULT")
@@ -236,15 +236,10 @@ def test_chunked_upload_via_curl
236
236
  resp = Tempfile.new('resp')
237
237
  resp.sync = true
238
238
 
239
- rd, wr = IO.pipe
240
- wr.sync = rd.sync = true
241
- pid = fork {
242
- STDIN.reopen(rd)
243
- rd.close
244
- wr.close
245
- STDOUT.reopen(resp)
246
- exec cmd
247
- }
239
+ rd, wr = IO.pipe.each do |io|
240
+ io.sync = io.close_on_exec = true
241
+ end
242
+ pid = spawn(*cmd, { 0 => rd, 1 => resp })
248
243
  rd.close
249
244
 
250
245
  tmp.rewind
@@ -11,18 +11,18 @@
11
11
 
12
12
  Gem::Specification.new do |s|
13
13
  s.name = %q{unicorn}
14
- s.version = (ENV['VERSION'] || '5.5.0').dup
14
+ s.version = (ENV['VERSION'] || '5.5.3').dup
15
15
  s.authors = ['unicorn hackers']
16
16
  s.summary = 'Rack HTTP server for fast clients and Unix'
17
17
  s.description = File.read('README').split("\n\n")[1]
18
- s.email = %q{unicorn-public@bogomips.org}
18
+ s.email = %q{unicorn-public@yhbt.net}
19
19
  s.executables = %w(unicorn unicorn_rails)
20
20
  s.extensions = %w(ext/unicorn_http/extconf.rb)
21
21
  s.extra_rdoc_files = IO.readlines('.document').map!(&:chomp!).keep_if do |f|
22
22
  File.exist?(f)
23
23
  end
24
24
  s.files = manifest
25
- s.homepage = 'https://bogomips.org/unicorn/'
25
+ s.homepage = 'https://yhbt.net/unicorn/'
26
26
  s.test_files = test_files
27
27
 
28
28
  # technically we need ">= 1.9.3", too, but avoid the array here since
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.5.2
4
+ version: 5.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - unicorn hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2020-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -72,7 +72,7 @@ description: |-
72
72
  advantage of features in Unix/Unix-like kernels. Slow clients should
73
73
  only be served by placing a reverse proxy capable of fully buffering
74
74
  both the the request and response in between unicorn and slow clients.
75
- email: unicorn-public@bogomips.org
75
+ email: unicorn-public@yhbt.net
76
76
  executables:
77
77
  - unicorn
78
78
  - unicorn_rails
@@ -271,7 +271,7 @@ files:
271
271
  - unicorn.gemspec
272
272
  - unicorn_1
273
273
  - unicorn_rails_1
274
- homepage: https://bogomips.org/unicorn/
274
+ homepage: https://yhbt.net/unicorn/
275
275
  licenses:
276
276
  - GPL-2.0+
277
277
  - Ruby-1.8
@@ -301,4 +301,5 @@ test_files:
301
301
  - test/unit/test_http_parser_ng.rb
302
302
  - test/unit/test_request.rb
303
303
  - test/unit/test_server.rb
304
+ - test/unit/test_upload.rb
304
305
  - test/unit/test_util.rb