about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-05-06unicorn 0.99.0 - simplicity wins v0.99.0
Starting with this release, we'll always load Rack up front at startup. Previously we had complicated ways to avoid loading Rack until after the application was loaded to allow the application to load an alternate version of Rack. However this has proven too error-prone to be worth supporting even though Unicorn does not have strict requirements on currently released Rack versions. If an app requires a different version of Rack than what Unicorn would load by default, it is recommended they only install that version of Rack (and no others) since Unicorn does not have any strict requirements on currently released Rack versions. Rails 2.3.x users should be aware of this as those versions are not compatible with Rack 1.1.0. If it is not possible to only have one Rack version installed "globally", then they should either use Isolate or Bundler and install a private version of Unicorn along with their preferred version of Rack. Users who install in this way are recommended to execute the isolated/bundled version of Unicorn, instead of what would normally be in $PATH. Feedback/tips to mailto:mongrel-unicorn@rubyforge.org from Isolate and Bundler users would be greatly appreciated.
2010-05-06always load Rack up front at startup
It's too complicated and error-prone to allow apps to use a different version of Rack than the one Unicorn would otherwise use by default. If an app requires a different version of Rack than what Unicorn would load by default, it is recommended they only install that version of Rack (and no others) since Unicorn does not have any strict requirements on currently released Rack versions. If it is not possible to only have one Rack version installed globally, then they should either use Isolate or Bundler and install a private version of Unicorn along with their preferred version of Rack. Users who install in this way are recommended to execute the isolated/bundled version of Unicorn, instead of what would normally be in $PATH. Feedback/tips to mailto:mongrel-unicorn@rubyforge.org from Isolate and Bundler users would be greatly appreciated.
2010-05-06GNUmakefile: update RAA and Freshmeat on release
2010-05-04unicorn 0.98.0 v0.98.0
Deployments that suspend or hibernate servers should no longer have workers killed off (and restarted) upon resuming. For Linux users of {raindrops}[http://raindrops.bogomips.org/] (v0.2.0+) configuration is easier as raindrops can now automatically detect the active listeners on the server via the new Unicorn.listener_names singleton method. For the pedantic, chunked request bodies without trailers are no longer allowed to omit the final CRLF. This shouldn't affect any real and RFC-compliant clients out there. Chunked requests with trailers have always worked and continue to work the same way. The rest are mostly small internal cleanups and documentation fixes. See the commit logs for full details.
2010-05-04README: avoid needless links to /Unicorn.html module
It makes the HTML page too big and busy.
2010-04-30add global Unicorn.listener_names method
This is useful as a :listeners argument when setting up Raindrops::Middleware (http://raindrops.bogomips.org/), as it can be done automatically.
2010-04-26GNUmakefile: fix backwards compat links for manpages
2010-04-26GNUmakefile: rdoc 2.5.x compatibility
2010-04-26GNUmakefile: avoid FS namespace conflict
'tmp' may be a directory when using rake-compiler (or isolate), so avoid naming a file 'tmp'
2010-04-26Merge branch 'maint'
* maint: unicorn 0.97.1 - fix HTTP parser for Rainbows!/Zbatery http: negative/invalid Content-Length raises exception
2010-04-26Rakefile: hopefully fix optional rake-compiler support
2010-04-26http: pedantic fix for trailer-less chunked requests
HTTP requests without trailers still need a CRLF after the last chunk, that is: it must end as: "0\r\n\r\n", not "0\r\n". So we'll always pretend there are trailers to parse for the sake of TeeInput. This is mostly a pedantic fix, as the two bytes in the socket buffer are unlikely to trigger protocol errors.
2010-04-20KNOWN_ISSUES: fix error in isolate example :x
2010-04-20KNOWN_ISSUES: additional note for Isolate usage
2010-04-19unicorn 0.97.1 - fix HTTP parser for Rainbows!/Zbatery v0.97.1
This release fixes a denial-of-service vector for derived servers exposed directly to untrusted clients. This bug does not affect most Unicorn deployments as Unicorn is only supported with trusted clients (such as nginx) on a LAN. nginx is known to reject clients that send invalid Content-Length headers, so any deployments on a trusted LAN and/or behind nginx are safe. Servers affected by this bug include (but are not limited to) Rainbows! and Zbatery. This bug does not affect Thin nor Mongrel, as neither got the request body filtering treatment that the Unicorn HTTP parser got in August 2009. The bug fixed in this release could result in a denial-of-service as it would trigger a process-wide assertion instead of raising an exception. For servers such as Rainbows!/Zbatery that serve multiple clients per worker process, this could abort all clients connected to the particular worker process that hit the assertion.
2010-04-19http: negative/invalid Content-Length raises exception
...instead of tripping an assertion. This fixes a potential denial-of-service for servers exposed directly to untrusted clients. This bug does not affect supported Unicorn deployments as Unicorn is only supported with trusted clients (such as nginx) on a LAN. nginx is known to reject clients that send invalid Content-Length headers, so any deployments on a trusted LAN and/or behind nginx are safe. Servers affected by this bug include (but are not limited to) Rainbows! and Zbatery. This does not affect Thin nor Mongrel which never got request body filtering treatment that the Unicorn HTTP parser got in August 2009.
2010-04-19http: negative/invalid Content-Length raises exception
...instead of tripping an assertion. This fixes a potential denial-of-service for servers exposed directly to untrusted clients. This bug does not affect supported Unicorn deployments as Unicorn is only supported with trusted clients (such as nginx) on a LAN. nginx is known to reject clients that send invalid Content-Length headers, so any deployments on a trusted LAN and/or behind nginx are safe. Servers affected by this bug include (but are not limited to) Rainbows! and Zbatery. This does not affect Thin nor Mongrel which never got request body filtering treatment that the Unicorn HTTP parser got in August 2009.
2010-04-19avoid nuking workers after waking up from suspend/hibernate
Trying to fix this issue again, as it seems to have been broken again.
2010-04-19prefer explicit requires when possible
There is no need to be using autoload except for HttpResponse which depends on Rack (which we want to load as late as possible).
2010-04-08unicorn: load constants after app has loaded
This will help ensure we use the same version of Rack the application uses and avoid loading conflicting/incompatible versions.
2010-04-08bin/*: remove unnecessary listeners variable
2010-04-08unicorn_rails: rename variable for consistency
"ru" is the preferred name in Unicorn.builder, so we'll match that to make things easier to follow.
2010-04-08unicorn_rails: respect user's encoding in config.ru in 1.9
Do not assume the user wants config.ru to be Encoding::BINARY for 1.9. This is a followup to a4a8bf7604d1c15c5a8fb9cb6be37e8bccb32e52
2010-04-08unicorn_rails: use TOPLEVEL_BINDING for eval
This is to ensure there are no namespace inconsistencies
2010-03-24KNOWN_ISSUES: document Array#shuffle / Array#sample issue under 1.9
We're one of the few forking apps that run into this rarely used feature, so we'll document it here.
2010-03-20tests: fix to run under Ruby 1.9.2dev
Avoid Tempfile.new(nil), which breaks under Ruby 1.9.2 and was probably a bad idea to begin with.
2010-03-01unicorn 0.97.0 - polishing and cleaning up v0.97.0
A bunch of small fixes related to startup/configuration and hot reload issues with HUP: * Variables in the user-generated config.ru files no longer risk clobbering variables used in laucher scripts. * signal handlers are initialized before the pid file is dropped, so over-eager firing of init scripts won't mysteriously nuke a process. * SIGHUP will return app to original state if an updated config.ru fails to load due to {Syntax,Load}Error. * unicorn_rails should be Rails 3 compatible out-of-the-box ('unicorn' works as always, and is recommended for Rails 3) * unicorn_rails is finally "working_directory"-aware when generating default temporary paths and pid file * config.ru encoding is the application's default in 1.9, not forced to binary like many parts of Unicorn. * configurator learned to handle the "user" directive outside of after_fork hook (which will always remain supported). There are also various internal cleanups and possible speedups.
2010-03-01load the Etc module up front
It's part of the standard Ruby library and will always be loaded by various modules (Rack::Utils, Tmpdir) so there's no point in deferring it.
2010-03-01configurator "user" directive outside of after_fork
Allowing the "user" directive outside of after_fork reduces the cognitive overhead for folks that do not need the complexity of *_fork hooks. Using Worker#user remains supported as it offers fine-grained control of user switching.
2010-02-28bin/*: remove redundant $DEBUG check
2010-02-28respect user's encoding in config.ru in 1.9
Do not assume the user wants config.ru to be Encoding::BINARY for 1.9.
2010-02-28unicorn_rails: small scoping cleanup
2010-02-28put switch parsing for config.ru into Unicorn.builder
This lets us reuse code for Zbatery and Rainbows!, too.
2010-02-27tee_input: do not #dup string buffers
It's a waste of memory bandwidth to do memcpy() when we know Unicorn::HttpParser (via rb_str_resize()) will allocate new memory for the string for us. An empty String is "free", as we've already paid the Object cost regardless.
2010-02-26tee_input: avoid instance variables, it's a struct
We'll use struct members exclusively from now on instead of throwing ivars into the mix. This allows us to _unofficially_ support direct access to more members easily. Unofficial extensions may include the ability to splice(2)/tee(2) for better performance. This also makes our object size smaller across all Ruby implementations as well, too (helps Rainbows! out).
2010-02-25unicorn_rails: make this "working_directory"-aware
The temporary paths we create to mimic script/server-emulation did not work when working_directory was used. Now we defer path creation until after working_directory is bound.
2010-02-25doc: clarify the intent of `unicorn_rails`
2010-02-24unicorn_rails: avoid namespace conflicts in config.ru
We'll use our Rails-only version of Unicorn.builder so the lambda is safe without another binding.
2010-02-24unicorn_rails: make this Rails 3-compatible
The stock config/boot.rb file in a Rails 3 app is much lighter and does not export any Rails/RAILS_* constants, so we'll wait until we get config/environment.rb loaded.
2010-02-22util: simplify chown_logs
no point in using "next" here
2010-02-22avoid needlessly preallocating read buffer
Copy-on-write will always invalidate it regardless, and the first request is likely to be slow for any app.
2010-02-19update TODO
* Bourne shell - TAP test suite stolen from Rainbows! * tests currently pass under FreeBSD 7.2
2010-02-18.gitignore: add "*.o" object files
This was always in my .git/info/exclude so I never noticed until now.
2010-02-18http: document CFLAGS used for development
this file may be sourced and used later, too
2010-02-18http: const correctness fixes
Not fun, but maybe this can help us spot _real_ problems more easily in the future.
2010-02-18http: cleanup globals and ABI namespace
* init_globals() is a static function, avoid conflicting with any potential libraries out there... * mUnicorn and cHttpParser do not need to be static globals they're not used outside of Init_unicorn_http().
2010-02-18http: avoid signedness warnings
We never come close to the signed limits anywhere, so it should be safe either way, but make paranoid compiler settings less noisy if possible.
2010-02-18Unicorn::builder to wrap our Rack::Builder usage
This should make it easier to reuse code in derivative servers like Rainbows! and Zbatery. Unfortunately, we can't depend on Rack::Builder/Rack::Server yet since Rack 1.1 just got them and notable frameworks (like Rails 2.3.x) do not fully work with Rack 1.1 yet). This also fixes subtle issue with config.ru files that could have variables that conflict with the Unicorn-specific namespace (this bug still affects "unicorn_rails", which could use some reworking as well).
2010-02-18graceful handling of bad config.ru + HUP w/ preload_app
If preload_app is true and Unicorn is HUP-ed with a bad config.ru, then it would be possible to have Unicorn in a bad state and constantly throw 500 errors. We now detect syntax and load errors since they're likely to appear in modified Rackup files, and will restore the original app if reloading failed.
2010-02-17test-lib: don't croak if "error" is in the test name