Files | Admin

Notes:

Release Name: 3.4.0

Notes:
unicorn 3.4.0 - for people with very big LANs

Unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between Unicorn and slow clients.

* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://bogomips.org/unicorn.git

Changes:

* IPv6 support in the HTTP hostname parser and configuration
  language.  Configurator syntax for "listen" addresses should
  be the same as nginx.  Even though we support IPv6, we will
  never support non-LAN/localhost clients connecting to Unicorn.

* TCP_NOPUSH/TCP_CORK is enabled by default to optimize
  for bandwidth usage and avoid unnecessary wakeups in nginx.

* Updated KNOWN_ISSUES document for bugs in recent Ruby 1.8.7
  (RNG needs reset after fork) and nginx+sendfile()+FreeBSD 8.

* examples/nginx.conf updated for modern stable versions of nginx.

* "Status" in headers no longer ignored in the response,
  Rack::Lint already enforces this so we don't duplicate
  the work.

* All tests pass under Ruby 1.9.3dev

* various bugfixes in the (mostly unused) ExecCGI class that
  powers http://bogomips.org/unicorn.git



Changes: .wrongdoc.yml | 4 +- GIT-VERSION-GEN | 2 +- KNOWN_ISSUES | 24 ++- README | 4 +- Rakefile | 5 +- examples/nginx.conf | 20 +- ext/unicorn_http/unicorn_http.rl | 13 +- ext/unicorn_http/unicorn_http_common.rl | 2 +- lib/unicorn/app/exec_cgi.rb | 47 ++-- lib/unicorn/configurator.rb | 28 ++- lib/unicorn/const.rb | 4 +- lib/unicorn/http_response.rb | 2 +- lib/unicorn/http_server.rb | 1 - lib/unicorn/socket_helper.rb | 52 +++-- lib/unicorn/tee_input.rb | 2 +- script/isolate_for_tests | 2 +- t/bin/unused_listen | 17 +- test/exec/test_exec.rb | 3 +- test/rails/test_rails.rb | 2 +- test/test_helper.rb | 19 +-- test/unit/test_configurator.rb | 8 + test/unit/test_http_parser.rb | 424 +++++++++++++++++++++---------- test/unit/test_http_parser_ng.rb | 273 +++++++++++--------- test/unit/test_request.rb | 6 +- test/unit/test_response.rb | 12 - test/unit/test_server.rb | 11 +- test/unit/test_tee_input.rb | 46 ++-- test/unit/test_upload.rb | 12 +- unicorn.gemspec | 4 +- 29 files changed, 630 insertions(+), 419 deletions(-) commit 6ffc294aac4735127ac9455266623aaa3603e9c1 Author: Eric Wong Date: Fri Feb 4 13:06:30 2011 -0800 unicorn 3.4.0 - for people with very big LANs * IPv6 support in the HTTP hostname parser and configuration language. Configurator syntax for "listen" addresses should be the same as nginx. Even though we support IPv6, we will never support non-LAN/localhost clients connecting to Unicorn. * TCP_NOPUSH/TCP_CORK is enabled by default to optimize for bandwidth usage and avoid unnecessary wakeups in nginx. * Updated KNOWN_ISSUES document for bugs in recent Ruby 1.8.7 (RNG needs reset after fork) and nginx+sendfile()+FreeBSD 8. * examples/nginx.conf updated for modern stable versions of nginx. * "Status" in headers no longer ignored in the response, Rack::Lint already enforces this so we don't duplicate the work. * All tests pass under Ruby 1.9.3dev * various bugfixes in the (mostly unused) ExecCGI class that powers http://bogomips.org/unicorn.git commit 3df8a197320b8a9e8a6413dcd04613db0558d90a Author: Eric Wong Date: Fri Feb 4 13:04:39 2011 -0800 bump dependency on kgio This is needed for IPv6 support, and 2.2.0 is nicer all around for Rainbows! users. Updates wrongdoc while we're at it, too. commit 1045faa0f9e94b13ee0281b7968b72d6f50dd5bf Author: Eric Wong Date: Thu Feb 3 13:53:18 2011 -0800 test/unit: fix tests under Ruby 1.9.3dev Ugh, one day I'll clean them up, one day... commit 9e7a8114fb0fcc56b475d17f158eaa5b7f1f7bdd Author: Eric Wong Date: Wed Feb 2 17:37:22 2011 -0800 Fix Ruby 1.9.3dev warnings for i in `git ls-files '*.rb'`; do ruby -w -c $i; done commit e597e594ad88dc02d70f7d3521d0d3bdc23739bb Author: Eric Wong Date: Wed Feb 2 16:54:07 2011 -0800 test_helper: simplify random port binding Duh... commit 314680327b95c0dc5e11be45a6343ca2a18ee447 Author: Eric Wong Date: Wed Feb 2 16:27:30 2011 -0800 socket_helper: cleanup leftover debugging statement Oops! Ugh, not my day... commit e0160a18ef5c4592d1ac5ff24ba8ae0fd703057c Author: Eric Wong Date: Wed Feb 2 15:34:33 2011 -0800 socket_helper: export tcp_name as a module_function Oops! commit 87fd86ef22b6b80fa75dd8e50f53a4e62e8339f7 Author: Eric Wong Date: Wed Feb 2 15:22:02 2011 -0800 allow binding on IPv6 sockets with listen "[#{addr}]:#{port}" This is much like how nginx does it, except we always require a port when explicitly binding to IPv6 using the "listen" directive. This also adds support to listen with an address-only, which can be useful to Rainbows! users. commit d140e7b1ff44b06bc54c2b790d06e9c7325503fe Author: Eric Wong Date: Wed Feb 2 14:45:57 2011 -0800 http: parser handles IPv6 bracketed IP hostnames Just in case we have people that don't use DNS, we can support folks who enter ugly IPv6 addresses... IPv6 uses brackets around the address to avoid confusing the colons used in the address with the colon used to denote the TCP port number in URIs. commit 24f8ef5f385e38954a5582fb2e8cd9d12fbf7d20 Author: Eric Wong Date: Mon Jan 31 16:14:46 2011 -0800 force socket options to defaults if unspecified This reduces surprise when people (correctly) believe removing an option from the config file will return things back to our internal defaults. commit c28e2610cfc70e89a0ffabe18356d148afe98bfc Author: Eric Wong Date: Mon Jan 31 15:51:30 2011 -0800 enable TCP_NOPUSH/TCP_CORK by default It's actually harmless since Unicorn only supports "fast" applications that do not trickle, and we don't do keepalive so we'll always flush-on-close. This should reduce wakeups on the nginx proxy server if nginx is over TCP. Mongrel 1.x had TCP_CORK enabled by default, too. commit e3420e0ae1f3c38f125010134d2cdeb22c6fa64e Author: Eric Wong Date: Mon Jan 31 15:50:37 2011 -0800 test_upload: check size in server The client may not get a proper response with TCP_CORK enabled commit f4caf6b6bdea902abaadd3c04b2af94f056c4ff1 Author: Eric Wong Date: Fri Jan 28 18:11:26 2011 +0000 KNOWN_ISSUES: document broken RNG+fork in newer Ruby 1.8 Reported by: ghazel@gmail.com ref: commit 09afcf2ce9fc89d77b6b282bbf00a78c73741a4b Author: Eric Wong Date: Tue Jan 25 13:58:29 2011 -0800 examples/nginx.conf: use try_files directive This feature is in nginx 0.7.x and 0.8.x and optimized better than the "if" directive in nginx.conf ref: http://wiki.nginx.org/Pitfalls ref: http://wiki.nginx.org/IfIsEvil commit 1ca83b055375ab7e72d383ffd0f36f70c07d9e92 Author: Eric Wong Date: Tue Jan 25 13:56:39 2011 -0800 examples/nginx: avoid unnecessary listen directive There's no need to use listen unless you use non-default port or can enable "deferred" or "httpready" (which you usually want). commit fb1f33aecc7102fb5c10e27c65b9b27cf249415f Author: Eric Wong Date: Tue Jan 25 13:42:53 2011 -0800 KNOWN_ISSUES: split old stuff into its own section Ruby 1.9.1, Sinatra 0.3.x, and Rails 2.3.2 are not in common use anymore (at least we don't think). commit 8ac0ae45a04f5f121f323c182403ef6eb0d8aa18 Author: Eric Wong Date: Tue Jan 25 13:30:21 2011 -0800 KNOWN_ISSUES: FreeBSD 8 and sendfile can be buggy Reported by Alexey Bondar. commit d770d09dfd9e5d7148379c58cdf9a020cbdc63b6 Author: Eric Wong Date: Fri Jan 21 12:28:39 2011 -0800 git.bogomips.org => bogomips.org bogomips.org is slimming down and losing URL weight :) commit 6cca8e61c66c1c2a8ebe260813fa83e44530a768 Author: Eric Wong Date: Fri Jan 21 04:01:01 2011 +0000 exec_cgi: handle Status header in CGI response We no longer blindly return 200 if the CGI returned another error code. We also don't want two Status headers in our output since we no longer filter it out. commit c4d77de381c40cf315e6f84791e3fb634bc10675 Author: Eric Wong Date: Fri Jan 21 04:01:02 2011 +0000 exec_cgi: make output compatible with IO.copy_stream Rainbows! can then use this to bypass luserspace given the correct offset is set before hand and the file is unlinked. commit 4150a398a48b9bca96aa623380161229ac0f8622 Author: Eric Wong Date: Wed Jan 19 19:10:25 2011 -0800 configurator: undocument trust_x_forwarded_for This may not be supported in the future... commit ec400a537a0947796e108f3593721289661b49dc Author: Eric Wong Date: Fri Jan 7 10:14:46 2011 -0800 http_response: do not skip Status header set by app Rack::Lint already stops apps from using it. If a developer insists on it, then users who inspect their HTTP headers can point and laugh at them for not using Rack::Lint!