Release Name: 3.0.0
Notes:
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://git.bogomips.org/unicorn.git
Changes:
Rewindable "rack.input" may be disabled via the
"rewindable_input false" directive in the configuration file.
This will violate Rack::Lint for Rack 1.x applications, but can
reduce I/O for applications that do not need a rewindable
input.
This release updates us to the Kgio 2.x series which should play
more nicely with other libraries and applications. There are
also internal cleanups and improvements for future versions of
Rainbows!
The Unicorn 3.x series supercedes the 2.x series
while the 1.x series will remain supported indefinitely.
Changes:
GIT-VERSION-GEN | 2 +-
TODO | 3 -
ext/unicorn_http/global_variables.h | 4 -
ext/unicorn_http/unicorn_http.rl | 86 ++++++++-------
lib/unicorn.rb | 1 +
lib/unicorn/configurator.rb | 32 +++++-
lib/unicorn/const.rb | 4 +-
lib/unicorn/http_request.rb | 13 ++-
lib/unicorn/http_server.rb | 9 ++
lib/unicorn/preread_input.rb | 2 +-
lib/unicorn/stream_input.rb | 145 +++++++++++++++++++++++++
lib/unicorn/tee_input.rb | 147 ++++----------------------
script/isolate_for_tests | 2 +-
t/t0013-rewindable-input-false.sh | 24 ++++
t/t0013.ru | 12 ++
t/t0014-rewindable-input-true.sh | 24 ++++
t/t0014.ru | 12 ++
test/unit/test_http_parser.rb | 16 +++-
test/unit/test_http_parser_ng.rb | 55 ++++++++--
test/unit/test_stream_input.rb | 204 +++++++++++++++++++++++++++++++++++
test/unit/test_tee_input.rb | 60 ++++++++---
unicorn.gemspec | 2 +-
22 files changed, 644 insertions(+), 215 deletions(-)
commit dee9e6432c8eb5269a19c4c6b66ab932fdeda34f
Author: Eric Wong
Date: Sat Nov 20 10:14:19 2010 +0800
unicorn 3.0.0 - disable rewindable input!
Rewindable "rack.input" may be disabled via the
"rewindable_input false" directive in the configuration file.
This will violate Rack::Lint for Rack 1.x applications, but can
reduce I/O for applications that do not need a rewindable
input.
This release updates us to the Kgio 2.x series which should play
more nicely with other libraries and applications. There are
also internal cleanups and improvements for future versions of
Rainbows!
The Unicorn 3.x series supercedes the 2.x series
while the 1.x series will remain supported indefinitely.
commit ad268cea66c2b91538dd60fc7f945348bb24214d
Author: Eric Wong
Date: Sat Nov 20 08:07:12 2010 +0800
tests: stream_input tests for mixed gets/read calls
Some apps may do them, so make sure we do them correctly.
commit cd315e5a20b17d29679fb22b4e2ab44cd6d0edeb
Author: Eric Wong
Date: Sat Nov 20 07:45:57 2010 +0800
stream_input: use String#sub! instead of gsub!
There's no difference because of the \A anchor, but sub!
is doesn't loop so it's simpler.
commit 5bc239fd154a7eaebeb024394f8e0b507bbf4c5a
Author: Eric Wong
Date: Fri Nov 19 20:51:57 2010 +0000
stream_input: small cleanups and fixes
No need to accept any number of args, that could hide bugs in
applications that could give three or more arguments. We also
raise ArgumentError when given a negative length argument to
read.
commit d12e10ea88c7adeb97094e4b835201e4c2ce52ab
Author: Eric Wong
Date: Fri Nov 19 01:55:07 2010 +0000
tests: isolate kgio 2.0.0 instead of the prerelease
Same thing, but might as well make it more obvious.
commit 507f228864574437e610e57d20d3b77c1e6d0e41
Author: Eric Wong
Date: Fri Nov 19 08:04:14 2010 +0800
unicorn 3.0.0pre2 - less bad than 2.x or 3.0.0pre1!
This release updates us to the Kgio 2.x series which should play
more nicely with other applications. There are also bugfixes
from the 2.0.1 release and a small bugfix to the new StreamInput
class.
The Unicorn 3.x series will supercede the 2.x series
while the 1.x series will remain supported indefinitely.
commit 238c98ec4c353bb14671ab543c21baa068b7e3f2
Author: Eric Wong
Date: Fri Nov 19 08:02:45 2010 +0800
update to kgio 2.x series
The Kgio 2.x API is less brain-damaged than the 1.3.x series
was, and should solve API-compatibility problems with
dalli 0.11.1.
commit 86d2a22ffdc4bf9f16e1870f9db9a2ff84760c7c
Merge: eda4086 268c2ec
Author: Eric Wong
Date: Thu Nov 18 07:48:12 2010 +0800
Merge branch '2.0.x-stable'
* 2.0.x-stable:
unicorn 2.0.1 - fix errors in error handling
tests: add parser error test from Rainbows!
http_server: fix HttpParserError constant resolution
t0012: fix race condition in reload
commit eda408603edc51f10f17217c767b31a45eb6c627
Author: Eric Wong
Date: Thu Nov 18 07:44:47 2010 +0800
tests: add parser error test from Rainbows!
This will help ensure we trap our own errors properly
in the future.
commit 3362dc51934c15fd944748e55ba4a470cc60d27d
Author: Eric Wong
Date: Thu Nov 18 07:36:27 2010 +0800
stream_input: read with zero length returns ''
Any calls to read with an explicit zero length now returns an
empty string. While not explicitly specified by Rack::Lint,
this is for compatibility with StringIO and IO methods which
are common in other web servers.
commit 390e351dd1283d4c80a12b744b1327fff091a141
Author: Eric Wong
Date: Wed Nov 17 11:20:02 2010 -0800
http_server: fix HttpParserError constant resolution
"Unicorn" is no longer in the default constant resolution
namespace.
commit 01ae51fa5fda40a63277b0d1189925fb209c75a9
Author: Eric Wong
Date: Thu Nov 18 02:48:41 2010 +0800
add missing test files
oops :x
commit 958c1f81a2c570f4027d8fe2dd4f5c40ac7ed430
Author: Eric Wong
Date: Tue Nov 16 16:00:07 2010 -0800
unicorn 3.0.0pre1
Rewindable "rack.input" may be disabled via the
"rewindable_input false" directive in the configuration file.
This will violate Rack::Lint for Rack 1.x applications, but
can reduce I/O for applications that do not need it.
There are also internal cleanups and enhancements for future
versions of Rainbows!
Eric Wong (11):
t0012: fix race condition in reload
enable HTTP keepalive support for all methods
http_parser: add HttpParser#next? method
tee_input: switch to simpler API for parsing trailers
switch versions to 3.0.0pre
add stream_input class and build tee_input on it
configurator: enable "rewindable_input" directive
http_parser: ensure keepalive is disabled when reset
*_input: make life easier for subclasses/modules
tee_input: restore read position after #size
preread_input: no-op for non-rewindable "rack.input"
commit 431de671a29b312bd19e615bd4bd99228b0c8b13
Author: Eric Wong
Date: Tue Nov 16 13:51:24 2010 -0800
preread_input: no-op for non-rewindable "rack.input"
We may get "rack.input" objects that are not rewindable
in the future, so be prepared for those and do no harm.
commit 17a734a9f6ccea8c969a574f09b5d8dd3d568a9c
Author: Eric Wong
Date: Sat Nov 13 16:41:10 2010 +0800
tee_input: restore read position after #size
It's possible for an application to call size after it has read
a few bytes/lines, so do not screw up a user's read offset when
consuming input.
commit 855c02a9720a17854a2f1c715efbe502cdba54e2
Author: Eric Wong
Date: Fri Nov 12 10:59:14 2010 +0800
*_input: make life easier for subclasses/modules
Avoid having specific knowledge of internals in TeeInput
and instead move that to StreamInput when dealing with
byte counts. This makes things easier for Rainbows! which
will need to extends these classes.
commit 3b544fb2c0e4a1e14a7bcb752a8af9819b5aaeb2
Author: Eric Wong
Date: Thu Nov 11 07:31:01 2010 +0800
http_parser: ensure keepalive is disabled when reset
We'll need this in Rainbows!
commit a89ccf321224f3248ddd00bb0edb320311604e4e
Author: Eric Wong
Date: Thu Nov 11 02:16:50 2010 +0800
configurator: enable "rewindable_input" directive
This allows users to override the current Rack spec and disable
the rewindable input requirement. This can allow applications
to use less I/O to minimize the performance impact when
processing uploads.
commit 7d44b5384758aeddcb49d7606a9908308df7c698
Author: Eric Wong
Date: Thu Nov 11 01:13:12 2010 +0800
add stream_input class and build tee_input on it
We will eventually expose a Unicorn::StreamInput object as
"rack.input" for Rack 2.x applications. StreamInput allows
applications to avoid buffering input to disk, removing the
(potentially expensive) rewindability requirement of Rack 1.x.
TeeInput is also rewritten to build off StreamInput for
simplicity. The only regression is that TeeInput#rewind forces
us to consume an unconsumed stream before returning, a
negligible price to pay for decreased complexity.
commit 1493af7cc23afecc8592ce44f5226476afccd212
Author: Eric Wong
Date: Thu Nov 11 07:17:19 2010 +0800
switch versions to 3.0.0pre
Here are major, incompatible internal API changes.
commit 8edcc3f9e1be9113685e61b9a83994a02d37c768
Author: Eric Wong
Date: Sun Nov 7 10:21:43 2010 +0800
tee_input: switch to simpler API for parsing trailers
Not that anybody uses trailers extensively, but it's
good to know it's there.
commit 60a9ec94f1f738f881e67f0a881c44c104f07c04
Author: Eric Wong
Date: Sat Nov 6 10:30:44 2010 +0800
http_parser: add HttpParser#next? method
An easy combination of the existing HttpParser#keepalive? and
HttpParser#reset methods, this makes it easier to implement
persistence.
commit 7987e1a4001491f8a494f3926037f8cbee713263
Author: Eric Wong
Date: Fri Sep 3 01:48:24 2010 +0000
enable HTTP keepalive support for all methods
Yes, this means even POST/PUT bodies may be kept alive,
but only if the body (and trailers) are fully-consumed.
commit b45bf946545496cf8d69037113533d7a58ce7e20
Author: Eric Wong
Date: Thu Oct 28 09:03:21 2010 +0000
t0012: fix race condition in reload
We need to ensure the old worker is reaped before sending
new requests intended for the new worker.
|