unicorn 4.7.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.document +0 -1
  3. data/.gitattributes +5 -0
  4. data/.gitignore +2 -2
  5. data/.manifest +14 -21
  6. data/.olddoc.yml +22 -0
  7. data/Application_Timeouts +7 -7
  8. data/DESIGN +2 -4
  9. data/Documentation/.gitignore +1 -3
  10. data/Documentation/unicorn.1 +222 -0
  11. data/Documentation/unicorn_rails.1 +207 -0
  12. data/FAQ +23 -6
  13. data/GIT-VERSION-FILE +1 -1
  14. data/GIT-VERSION-GEN +1 -1
  15. data/GNUmakefile +139 -92
  16. data/HACKING +13 -28
  17. data/ISSUES +82 -19
  18. data/KNOWN_ISSUES +18 -18
  19. data/LATEST +22 -44
  20. data/LICENSE +2 -2
  21. data/Links +24 -22
  22. data/NEWS +729 -0
  23. data/PHILOSOPHY +0 -6
  24. data/README +50 -48
  25. data/Rakefile +0 -44
  26. data/SIGNALS +12 -3
  27. data/Sandbox +11 -10
  28. data/TODO +0 -2
  29. data/TUNING +30 -9
  30. data/archive/.gitignore +3 -0
  31. data/archive/slrnpull.conf +4 -0
  32. data/bin/unicorn +4 -2
  33. data/bin/unicorn_rails +3 -3
  34. data/examples/big_app_gc.rb +1 -1
  35. data/examples/init.sh +36 -8
  36. data/examples/logrotate.conf +17 -2
  37. data/examples/nginx.conf +14 -14
  38. data/examples/unicorn.conf.minimal.rb +2 -2
  39. data/examples/unicorn.conf.rb +14 -6
  40. data/examples/unicorn.socket +11 -0
  41. data/examples/unicorn@.service +40 -0
  42. data/ext/unicorn_http/common_field_optimization.h +23 -5
  43. data/ext/unicorn_http/ext_help.h +0 -20
  44. data/ext/unicorn_http/extconf.rb +37 -1
  45. data/ext/unicorn_http/global_variables.h +1 -1
  46. data/ext/unicorn_http/httpdate.c +2 -2
  47. data/ext/unicorn_http/unicorn_http.c +940 -644
  48. data/ext/unicorn_http/unicorn_http.rl +167 -170
  49. data/ext/unicorn_http/unicorn_http_common.rl +1 -1
  50. data/lib/unicorn/configurator.rb +110 -46
  51. data/lib/unicorn/const.rb +2 -25
  52. data/lib/unicorn/http_request.rb +110 -31
  53. data/lib/unicorn/http_response.rb +17 -31
  54. data/lib/unicorn/http_server.rb +292 -199
  55. data/lib/unicorn/launcher.rb +1 -1
  56. data/lib/unicorn/oob_gc.rb +16 -6
  57. data/lib/unicorn/socket_helper.rb +58 -78
  58. data/lib/unicorn/stream_input.rb +9 -11
  59. data/lib/unicorn/tee_input.rb +16 -11
  60. data/lib/unicorn/tmpio.rb +10 -6
  61. data/lib/unicorn/util.rb +5 -4
  62. data/lib/unicorn/version.rb +1 -1
  63. data/lib/unicorn/worker.rb +99 -22
  64. data/lib/unicorn.rb +69 -42
  65. data/man/man1/unicorn.1 +124 -122
  66. data/man/man1/unicorn_rails.1 +113 -127
  67. data/t/.gitignore +0 -1
  68. data/t/GNUmakefile +3 -80
  69. data/t/README +4 -4
  70. data/t/t0002-parser-error.sh +3 -3
  71. data/t/t0011-active-unix-socket.sh +1 -1
  72. data/t/t0012-reload-empty-config.sh +2 -1
  73. data/t/t0300-no-default-middleware.sh +6 -1
  74. data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
  75. data/t/t0301.ru +13 -0
  76. data/t/test-lib.sh +2 -2
  77. data/test/benchmark/README +14 -4
  78. data/test/benchmark/ddstream.ru +50 -0
  79. data/test/benchmark/readinput.ru +40 -0
  80. data/test/benchmark/uconnect.perl +66 -0
  81. data/test/exec/test_exec.rb +74 -20
  82. data/test/test_helper.rb +42 -33
  83. data/test/unit/test_ccc.rb +91 -0
  84. data/test/unit/test_droplet.rb +1 -1
  85. data/test/unit/test_http_parser.rb +49 -19
  86. data/test/unit/test_http_parser_ng.rb +98 -115
  87. data/test/unit/test_request.rb +11 -11
  88. data/test/unit/test_response.rb +31 -19
  89. data/test/unit/test_server.rb +89 -15
  90. data/test/unit/test_signals.rb +9 -9
  91. data/test/unit/test_socket_helper.rb +20 -14
  92. data/test/unit/test_tee_input.rb +10 -0
  93. data/test/unit/test_upload.rb +10 -15
  94. data/test/unit/test_util.rb +28 -3
  95. data/unicorn.gemspec +28 -23
  96. data/unicorn_1 +1 -0
  97. data/unicorn_rails_1 +1 -0
  98. metadata +64 -134
  99. data/.wrongdoc.yml +0 -10
  100. data/ChangeLog +0 -4694
  101. data/Documentation/GNUmakefile +0 -30
  102. data/Documentation/unicorn.1.txt +0 -178
  103. data/Documentation/unicorn_rails.1.txt +0 -175
  104. data/examples/git.ru +0 -13
  105. data/lib/unicorn/app/exec_cgi.rb +0 -154
  106. data/lib/unicorn/app/inetd.rb +0 -109
  107. data/lib/unicorn/ssl_client.rb +0 -11
  108. data/lib/unicorn/ssl_configurator.rb +0 -104
  109. data/lib/unicorn/ssl_server.rb +0 -42
  110. data/local.mk.sample +0 -59
  111. data/script/isolate_for_tests +0 -32
  112. data/t/hijack.ru +0 -42
  113. data/t/sslgen.sh +0 -71
  114. data/t/t0016-trust-x-forwarded-false.sh +0 -30
  115. data/t/t0017-trust-x-forwarded-true.sh +0 -30
  116. data/t/t0200-rack-hijack.sh +0 -27
  117. data/t/t0600-https-server-basic.sh +0 -48
  118. data/test/unit/test_http_parser_xftrust.rb +0 -38
  119. data/test/unit/test_sni_hostnames.rb +0 -47
data/KNOWN_ISSUES CHANGED
@@ -9,24 +9,14 @@ 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
- http://mid.gmane.org/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
16
- reset in the after_fork hook. Starting with \Unicorn 3.6.1, we
16
+ reset in the after_fork hook. Starting with unicorn 3.6.1, we
17
17
  have builtin workarounds for Kernel#rand and OpenSSL::Random users,
18
18
  but applications may use other PRNGs.
19
19
 
20
- * Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
21
- after_fork hook to get correct random number generation. We have a builtin
22
- workaround for this starting with \Unicorn 3.6.1
23
-
24
- See http://redmine.ruby-lang.org/issues/show/4338
25
-
26
- * On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
27
- stdio that causes failure for file uploads larger than 112K. Upgrade
28
- your version of Ruby or continue using Unicorn 1.x/3.4.x.
29
-
30
20
  * For notes on sandboxing tools such as Bundler or Isolate,
31
21
  see the {Sandbox}[link:Sandbox.html] page.
32
22
 
@@ -44,23 +34,33 @@ acceptable solution. Those issues are documented here.
44
34
 
45
35
  == Known Issues (Old)
46
36
 
37
+ * Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
38
+ after_fork hook to get correct random number generation. We have a builtin
39
+ workaround for this starting with unicorn 3.6.1
40
+
41
+ See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/36450
42
+
43
+ * On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
44
+ stdio that causes failure for file uploads larger than 112K. Upgrade
45
+ your version of Ruby or continue using unicorn 1.x/3.4.x.
46
+
47
47
  * Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will
48
48
  segfault if called after forking. Upgrade to Ruby 1.9.2 or call
49
49
  "Kernel.rand" in your after_fork hook to reinitialize the random
50
50
  number generator.
51
51
 
52
- See http://redmine.ruby-lang.org/issues/show/2962 for more details
52
+ See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/28655
53
53
 
54
54
  * Rails 2.3.2 bundles its own version of Rack. This may cause subtle
55
55
  bugs when simultaneously loaded with the system-wide Rack Rubygem
56
- which Unicorn depends on. Upgrading to Rails 2.3.4 (or later) is
56
+ which unicorn depends on. Upgrading to Rails 2.3.4 (or later) is
57
57
  strongly recommended for all Rails 2.3.x users for this (and security
58
58
  reasons). Rails 2.2.x series (or before) did not bundle Rack and are
59
59
  should be unnaffected. If there is any reason which forces your
60
60
  application to use Rails 2.3.2 and you have no other choice, then
61
- you may edit your Unicorn gemspec and remove the Rack dependency.
61
+ you may edit your unicorn gemspec and remove the Rack dependency.
62
62
 
63
- ref: http://mid.gmane.org/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
 
@@ -71,9 +71,9 @@ acceptable solution. Those issues are documented here.
71
71
  set :env, :production
72
72
  set :run, false
73
73
  Since this is no longer an issue with Sinatra 0.9.x apps, this will not be
74
- fixed on our end. Since Unicorn is itself the application launcher, the
74
+ fixed on our end. Since unicorn is itself the application launcher, the
75
75
  at_exit handler used in old Sinatra always caused Mongrel to be launched
76
- whenever a Unicorn worker was about to exit.
76
+ whenever a unicorn worker was about to exit.
77
77
 
78
78
  Also remember we're capable of replacing the running binary without dropping
79
79
  any connections regardless of framework :)
data/LATEST CHANGED
@@ -1,45 +1,23 @@
1
- === unicorn 4.7.0 - minor updates, license tweak / 2013-11-04 06:59 UTC
2
-
3
- * support SO_REUSEPORT on new listeners (:reuseport)
4
-
5
- This allows users to start an independent instance of unicorn on
6
- a the same port as a running unicorn (as long as both instances
7
- use :reuseport).
8
-
9
- ref: https://lwn.net/Articles/542629/
10
-
11
- * unicorn is now GPLv2-or-later and Ruby 1.8-licensed
12
- (instead of GPLv2-only, GPLv3-only, and Ruby 1.8-licensed)
13
-
14
- This changes nothing at the moment. Once the FSF publishes the next
15
- version of the GPL, users may choose the newer GPL version without the
16
- unicorn BDFL approving it. Two years ago when I got permission to add
17
- GPLv3 to the license options, I also got permission from all past
18
- contributors to approve future versions of the GPL. So now I'm
19
- approving all future versions of the GPL for use with unicorn.
20
-
21
- Reasoning below:
22
-
23
- In case the GPLv4 arrives and I am not alive to approve/review it,
24
- the lesser of evils is have give blanket approval of all future GPL
25
- versions (as published by the FSF). The worse evil is to be stuck
26
- with a license which cannot guarantee the Free-ness of this project
27
- in the future.
28
-
29
- This unfortunately means the FSF can theoretically come out with
30
- license terms I do not agree with, but the GPLv2 and GPLv3 will
31
- always be an option to all users.
32
-
33
- Note: we currently prefer GPLv3
34
-
35
- Two improvements thanks to Ernest W. Durbin III:
36
-
37
- * USR2 redirects fixed for Ruby 1.8.6 (broken since 4.1.0)
38
- * unicorn(1) and unicorn_rails(1) enforces valid integer for -p/--port
39
-
40
- A few more odd, minor tweaks and fixes:
41
-
42
- * attempt to rename PID file when possible (on USR2)
43
- * workaround reopen atomicity issues for stdio vs non-stdio
44
- * improve handling of client-triggerable socket errors
1
+ === unicorn 5.5.0 / 2019-03-04 00:41 UTC
2
+
3
+ Mostly identical to 5.5.0.pre1, which I didn't hear any feedback
4
+ from:
5
+
6
+ https://bogomips.org/unicorn-public/20181220222842.GA27382@dcvr/
7
+
8
+ > Jeremy Evans contributed the "default_middleware" configuration option:
9
+ >
10
+ > https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
11
+ >
12
+ > Jeremy also contributed the ability to use separate groups for the process
13
+ > and log files:
14
+ >
15
+ > https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
16
+ >
17
+ > There's also a couple of uninteresting minor optimizations and
18
+ > documentation additions.
19
+
20
+ Otherwise, there's one extra change to use
21
+ rb_gc_register_mark_object which is finally a documented part of
22
+ the Ruby C-API, but has existed since the 1.9 days.
45
23
 
data/LICENSE CHANGED
@@ -8,8 +8,8 @@ any later version. We currently prefer the GPLv3 or later for
8
8
  derivative works, but the GPLv2 is fine.
9
9
 
10
10
  The complete texts of the GPLv2 and GPLv3 are below:
11
- GPLv2 - http://www.gnu.org/licenses/gpl-2.0.txt
12
- GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
11
+ GPLv2 - https://www.gnu.org/licenses/gpl-2.0.txt
12
+ GPLv3 - https://www.gnu.org/licenses/gpl-3.0.txt
13
13
 
14
14
  You may (against our _preference_) also use the Ruby 1.8 license terms
15
15
  which we inherited from the original Mongrel project when we forked it:
data/Links CHANGED
@@ -1,56 +1,58 @@
1
1
  = Related Projects
2
2
 
3
- If you're interested in \Unicorn, you may be interested in some of the projects
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:mongrel-unicorn@rubyforge.org!
5
+ mailto:unicorn-public@yhbt.net!
6
6
 
7
7
  == Disclaimer
8
8
 
9
- The \Unicorn project is not responsible for the content in these links.
10
- Furthermore, the \Unicorn project has never, does not and will never endorse:
9
+ The unicorn project is not responsible for the content in these links.
10
+ Furthermore, the unicorn project has never, does not and will never endorse:
11
11
 
12
12
  * any for-profit entities or services
13
- * any non-{Free Software}[http://www.gnu.org/philosophy/free-sw.html]
13
+ * any non-{Free Software}[https://www.gnu.org/philosophy/free-sw.html]
14
14
 
15
15
  The existence of these links does not imply endorsement of any entities
16
16
  or services behind them.
17
17
 
18
- === For use with \Unicorn
18
+ === For use with unicorn
19
19
 
20
20
  * {Bluepill}[https://github.com/arya/bluepill] -
21
21
  a simple process monitoring tool written in Ruby
22
22
 
23
23
  * {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
24
- manage multiple \Unicorn instances/applications on a single server
24
+ manage multiple unicorn instances/applications on a single server
25
25
 
26
- * {raindrops}[http://raindrops.bogomips.org/] - real-time stats for
26
+ * {raindrops}[https://yhbt.net/raindrops/] - real-time stats for
27
27
  preforking Rack servers
28
28
 
29
- * {UnXF}[http://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
- === \Unicorn is written to work with
32
+ === unicorn is written to work with
33
33
 
34
- * {Rack}[http://rack.rubyforge.org/] - a minimal interface between webservers
34
+ * {Rack}[https://rack.github.io/] - a minimal interface between webservers
35
35
  supporting Ruby and Ruby frameworks
36
36
 
37
- * {Ruby}[http://ruby-lang.org/] - the programming language of Rack and \Unicorn
37
+ * {Ruby}[https://www.ruby-lang.org/en/] - the programming language of
38
+ Rack and unicorn
38
39
 
39
- * {nginx}[http://nginx.org/] - the reverse proxy for use with \Unicorn
40
-
41
- * {kgio}[http://bogomips.org/kgio/] - the I/O library written for \Unicorn
40
+ * {nginx}[https://nginx.org/] (Free versions) -
41
+ the reverse proxy for use with unicorn
42
42
 
43
43
  === Derivatives
44
44
 
45
- * {Green Unicorn}[http://gunicorn.org/] - a Python version of \Unicorn
45
+ * {Green Unicorn}[https://gunicorn.org/] - a Python version of unicorn
46
46
 
47
- * {Rainbows!}[http://rainbows.rubyforge.org/] - \Unicorn for sleepy
48
- apps and slow clients.
47
+ * {Starman}[https://metacpan.org/release/Starman/] - Plack/PSGI version
48
+ of unicorn
49
49
 
50
50
  === Prior Work
51
51
 
52
- * {Mongrel}[http://mongrel.rubyforge.org/] - the awesome webserver \Unicorn is
53
- based on
52
+ * {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
53
+ unicorn is based on. A historical archive of the mongrel dev list
54
+ featuring early discussions of unicorn is available at:
55
+ https://yhbt.net/mongrel-devel/
54
56
 
55
- * {david}[http://bogomips.org/david.git] - a tool to explain why you need
56
- nginx in front of \Unicorn
57
+ * {david}[https://yhbt.net/david.git] - a tool to explain why you need
58
+ nginx in front of unicorn