about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-12-26unicorn 3.2.0 - parser improvements for Rainbows! v3.2.0
There are numerous improvements in the HTTP parser for Rainbows!, none of which affect Unicorn-only users. The kgio dependency is incremented to 2.1: this should avoid ENOSYS errors for folks building binaries on newer Linux kernels and then deploying to older ones. There are also minor documentation improvements, the website is now JavaScript-free!
2010-12-26http_server: remove needless lambda
We can just use a begin block at startup, this also makes life easier on RDoc.
2010-12-26http_response: remove TODO item
An unconfigured Rainbows! (e.g. Rainbows! { use :Base }) already does keepalive and supports only a single client per-process.
2010-12-26http: #keepalive? and #headers? work after #next?
We need to preserve our internal flags and only clear them on HttpParser#parse. This allows the async concurrency models in Rainbows! to work properly.
2010-12-26bump kgio dependency to ~> 2.1
The kgio 2.x series will maintain API compatibility until 3.x, so it's safe to use any 2.x release.
2010-12-25http: fix typo in xftrust unit test
Oops
2010-12-25doc: use wrongdoc for documentation
wrongdoc factors out a bunch of common code from this project into its own and removes JavaScript from RDoc to boot.
2010-12-23TODO: remove item for TeeInput performance
Disabling TeeInput is possible now, so the filesystem is no longer a bottleneck :>
2010-12-21rdoc: include tag subject in NEWS file
It's more useful this way
2010-12-21rdoc: enable webcvs feature for cgit links
Hopefully this gets more people reading our source.
2010-12-21configurator: RDoc cleanups and improvements
This is the most important part of Unicorn documentation for end users.
2010-12-21http: hook up "trust_x_forwarded" to configurator
More config bloat, sadly this is necessary for Rainbows! :<
2010-12-20http: allow ignoring X-Forwarded-* for url_scheme
Evil clients may be exposed to the Unicorn parser via Rainbows!, so we'll allow people to turn off blindly trusting certain X-Forwarded* headers for "rack.url_scheme" and rely on middleware to handle it.
2010-12-20http: refactor finalize_header function
rack.url_scheme handling and SERVER_{NAME,PORT} handling each deserve their own functions.
2010-12-20http: update setting of "https" for rack.url_scheme
The first value of X-Forwarded-Proto in rack.url_scheme should be used as it can be chained. This header can be set multiple times via different proxies in the chain, but consider the first one to be valid. Additionally, respect X-Forwarded-SSL as it may be passed with the "on" flag instead of X-Forwarded-Proto. ref: rack commit 85ca454e6143a3081d90e4546ccad602a4c3ad2e and 35bb5ba6746b5d346de9202c004cc926039650c7
2010-12-20http: support keepalive_requests directive
This limits the number of keepalive requests of a single connection to prevent a single client from monopolizing server resources. On multi-process servers (e.g. Rainbows!) with many keepalive clients per worker process, this can force a client to reconnect and increase its chances of being accepted on a less-busy worker process. This directive is named after the nginx directive which is identical in function.
2010-12-19http: delay clearing env on HttpParser#next?
This allows apps/middlewares on Rainbows! that rely on env in the response_body#close to hold onto the env.
2010-12-10unicorn 3.1.0 - client_buffer_body_size tuning v3.1.0
This release enables tuning the client_buffer_body_size to raise or lower the threshold for buffering request bodies to disk. This only applies to users who have not disabled rewindable input. There is also a TeeInput bugfix for uncommon usage patterns and Configurator examples in the FAQ should be fixed
2010-12-09allow client_buffer_body_size to be tuned
Since modern machines have more memory these days and clients are sending more data, avoiding potentially slow filesystem operations for larger uploads can be useful for some applications.
2010-12-09configurator: ensure examples in FAQ still work
This has been broken since 2.0.x Internal cleanups sometimes have unintended consequences :<
2010-12-09tee_input: fix accounting error on corked requests
In case a request sends the header and buffer as one packet, TeeInput relying on accounting info from StreamInput is harmful as StreamInput will buffer in memory outside of TeeInput's control. This bug is triggered by calling env["rack.input"].size or env["rack.input"].rewind before to read.
2010-12-03unicorn 3.0.1 - one bugfix for Rainbows! v3.0.1
...and only Rainbows! This release fixes HTTP pipelining for requests with bodies for users of synchronous Rainbows! concurrency models. Since Unicorn itself does not support keepalive nor pipelining, Unicorn-only users need not upgrade.
2010-12-02stream_input: avoid trailer parsing on unchunked requests
It screws up keepalive for Rainbows! requests with a body.
2010-11-20unicorn 3.0.0 - disable rewindable input! v3.0.0
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.
2010-11-20tests: stream_input tests for mixed gets/read calls
Some apps may do them, so make sure we do them correctly.
2010-11-20stream_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.
2010-11-20stream_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.
2010-11-19tests: isolate kgio 2.0.0 instead of the prerelease
Same thing, but might as well make it more obvious.
2010-11-19unicorn 3.0.0pre2 - less bad than 2.x or 3.0.0pre1! v3.0.0pre2
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.
2010-11-19update 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.
2010-11-18Merge 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
2010-11-18unicorn 2.0.1 - fix errors in error handling v2.0.1
This release fixes errors in our own error handling, causing certain errors to not be logged nor responded to correctly. Eric Wong (3): t0012: fix race condition in reload http_server: fix HttpParserError constant resolution tests: add parser error test from Rainbows!
2010-11-18tests: add parser error test from Rainbows!
This will help ensure we trap our own errors properly in the future. (cherry picked from commit eda408603edc51f10f17217c767b31a45eb6c627)
2010-11-18tests: add parser error test from Rainbows!
This will help ensure we trap our own errors properly in the future.
2010-11-18stream_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.
2010-11-17http_server: fix HttpParserError constant resolution
"Unicorn" is no longer in the default constant resolution namespace. (cherry picked from commit 390e351dd1283d4c80a12b744b1327fff091a141)
2010-11-17http_server: fix HttpParserError constant resolution
"Unicorn" is no longer in the default constant resolution namespace.
2010-11-18add missing test files
oops :x
2010-11-16unicorn 3.0.0pre1 v3.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"
2010-11-16preread_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.
2010-11-16t0012: fix race condition in reload
We need to ensure the old worker is reaped before sending new requests intended for the new worker. (cherry picked from commit b45bf946545496cf8d69037113533d7a58ce7e20)
2010-11-13tee_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.
2010-11-12*_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.
2010-11-11http_parser: ensure keepalive is disabled when reset
We'll need this in Rainbows!
2010-11-11configurator: 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.
2010-11-11add 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.
2010-11-11switch versions to 3.0.0pre
Here are major, incompatible internal API changes.
2010-11-07tee_input: switch to simpler API for parsing trailers
Not that anybody uses trailers extensively, but it's good to know it's there.
2010-11-06http_parser: add HttpParser#next? method
An easy combination of the existing HttpParser#keepalive? and HttpParser#reset methods, this makes it easier to implement persistence.
2010-11-06enable 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.