From bb3c32a246b29929e845d96ebba0d8a31dd8054d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 Nov 2009 01:00:06 -0800 Subject: unicorn 0.94.0 The HTTP parser is fix for oddly-aligned reads of trailers (this technically affects headers, too, but is highly unlikely due to our non-support of slow clients). This allows our HTTP parser to better support very slow clients when used by other servers (like Rainbows!). Fortunately this bug does not appear to lead to any invalid memory accesses (and potential arbitrary code execution). FreeBSD (and possibly other *BSDs) support is improved and and all the test cases pass under FreeBSD 7.2. Various flavors of GNU/Linux remains our primary platform for development and production. New features added include the "working_directory" directive in the configurator . Even without specifying a "working_directory", symlink-aware detection of the current path no longer depends on /bin/sh so it should work out-of-the-box on FreeBSD and Solaris and not just systems where /bin/sh is dash, ksh93 or bash. User-switching support is finally supported but only intended for use in the after_fork hook of worker processes. Putting it in the after_fork hook allows allows users to set things like CPU affinity[1] on a per-worker basis before dropping privileges. The master process retains all privileges it started with. The ENV["RACK_ENV"] (process-wide) environment variable is now both read and set for `unicorn' in the same way RAILS_ENV is used by `unicorn_rails'. This allows the Merb launcher to read ENV["RACK_ENV"] in config.ru. Other web servers already set this and there may be applications or libraries that already rely on this de facto standard. Eric Wong (26): cleanup: avoid redundant error checks for fstat test_helper: connect(2) may fail with EINVAL GNUmakefile: fix non-portable tar(1) usage tests: provide a pure Ruby setsid(8) equivalent more portable symlink awareness for START_CTX[:cwd] test_signals: avoid portability issues with fchmod(2) cleanup error handling and make it less noisy Do not override Dir.chdir in config files configurator: add "working_directory" directive configurator: working_directory is expanded configurator: set ENV["PWD"] with working_directory, too configurator: working_directory affects pid, std{err,out}_paths configurator: update documentation for working_directory TODO: remove working_directory bit, done Util.reopen_logs: remove needless Range worker: user/group switching for after_fork hooks Fix autoload of Etc in Worker for Ruby 1.9 bin/unicorn: allow RACK_ENV to be passed from parent tests for RACK_ENV preservation http: allow headers/trailers to be written byte-wise http: extra test for bytewise chunked bodies tee_input: do not clobber trailer buffer on partial uploads test_exec: ensure master is killed after test Util::tmpio returns a TmpIO that responds to #size TODO: remove user-switching bit, done unicorn 0.94.0 Wayne Larsen (1): bin/unicorn: set ENV["RACK_ENV"] on startup [1] - Unicorn does not support CPU affinity directly, but it is possible to load code that allows it inside after_fork hooks, or even just call sched_tool(8). --- CONTRIBUTORS | 1 + GIT-VERSION-GEN | 2 +- GNUmakefile | 2 +- lib/unicorn/const.rb | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 252415a..97b891c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2,6 +2,7 @@ Unicorn developers: * Eric Wong * Suraj N. Kurapati * Andrey Stikheev +* Wayne Larsen * ... (help wanted) We would like to thank following folks for helping make Unicorn possible: diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 96f22f6..033c2c0 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v0.93.5.GIT +DEF_VER=v0.94.0.GIT LF=' ' diff --git a/GNUmakefile b/GNUmakefile index 695c0ae..91583a9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -156,7 +156,7 @@ NEWS: GIT-VERSION-FILE $(rake) -s news_rdoc > $@+ mv $@+ $@ -SINCE = 0.92.0 +SINCE = 0.93.0 ChangeLog: log_range = $(shell test -n "$(SINCE)" && echo v$(SINCE)..) ChangeLog: GIT-VERSION-FILE @echo "ChangeLog from $(GIT_URL) ($(SINCE)..$(GIT_VERSION))" > $@+ diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb index 5ac9ee8..4d9680c 100644 --- a/lib/unicorn/const.rb +++ b/lib/unicorn/const.rb @@ -7,7 +7,7 @@ module Unicorn # gave about a 3% to 10% performance improvement over using the strings directly. # Symbols did not really improve things much compared to constants. module Const - UNICORN_VERSION="0.93.5" + UNICORN_VERSION="0.94.0" DEFAULT_HOST = "0.0.0.0" # default TCP listen host address DEFAULT_PORT = 8080 # default TCP listen port -- cgit v1.2.3-24-ge0c7