about summary refs log tree commit homepage
path: root/t
DateCommit message (Collapse)
2010-07-19rev + em: enable keepalive for pipe/socket responses
This makes it easier to write proxies for slow clients that benefit from keep-alive. We also need to be careful about non-HTTP/1.1 connections that can't do keepalive, now.
2010-07-19rev + em: more easily allow Content-Length in pipe responses
If a response proxying a pipe (or socket) includes a Content-Length, do not attempt to outsmart the application and just use the given Content-Length. This helps avoid exposing applications to weird internals such as env["rainbows.autochunk"] and X-Rainbows-* response headers.
2010-07-19event_machine: avoid race in unchunked fast pipe responses
Using EM.enable_proxy with EM.attach seems to cause EM::Connection#receive_data callbacks to be fired before the proxy has a chance to act, leading the first few chunks of data being lost in the default receive_data handler. Instead just rely on EM.watch like the chunked pipe.
2010-07-11bump Unicorn dependency to 1.1.1
This avoids costant resolution problems on client EOF during input processing.
2010-07-10test_isolate: document why we test with Rack 1.1.0
2010-07-08restore Rainbows::HttpResponse.write for Cramp
Cramp monkey patches Rainbows internals for WebSockets support and we forgot about it. Add a new integration test to ensure this continues to work in the future (and force us to update the test for newer Cramp).
2010-07-08dev: bump isolate dependency to 2.1.0
2010-07-08bump unicorn dependencies
2010-07-06fix string slicing under 1.9 after short writes
Fortunately this only affects the hardly-used FiberSpawn and FiberPool concurrency models, and also unreleased revisions of Rev. 1.9 encoding is tricky to handle right when doing I/O in Ruby...
2010-07-06cleanup error handling for aborted downloads
We shouldn't ever spew errors to the stderr/logger on client disconnects (ECONNRESET/EPIPE/etc...).
2010-07-04refactor response body handling for sendfile(2)
This hopefully allows the "sendfile" gem to be required anywhere in the Rainbows!/Unicorn config file, and not have to be required via RUBYOPT or the '-r' command-line switch. We also modularize HttpResponse and avoids singleton methods in the response path. This (hopefully) makes it easier for individual concurrency models to share code and override individual methods.
2010-06-28add preliminary sendfile (1.0.0) gem support
This still needs work and lots of cleanup, but the basics are there. The sendfile 1.0.0 RubyGem is now safe to use under MRI 1.8, and is superior to current (1.9.2-preview3) versions of IO.copy_stream for static files in that it supports more platforms and doesn't truncate large files on 32-bit platforms.
2010-06-21tests: enable ActorSpawn test for rbx
2010-06-21test_isolate: bump unicorn dependency
2010-06-21test: no need for IO#sync=true in async-response tests
We only read from the IO pipe and never write to it
2010-06-21tests: avoid embedded command-line switches in tests
They're ugly and potentially non-portable to other servers. They also make Unicorn + Rubinius unhappy, which makes us unhappy as well.
2010-06-21bump async_sinatra test dependencies
Everything should be working under Ruby 1.9.2(-preview3) now.
2010-06-16test_isolate: fix ruby engine usage
Oops, looks like 1.9.1 exports the RUBY_ENGINE constant.
2010-06-11update test infrastructure to support Rubinius
Rubinius still has a few issues that prevent 100% support, but it basically works if log rotation or USR2 upgrades aren't required. Tickets for all known issues for Rubinius have been filed on the project's issue tracker. * rbx does not support -i/-p yet, so rely on MRI for that * "io/nonblock" is missing * avoiding any optional Gems for now (EM, Rev, etc..)
2010-06-11alt working_directory test from Unicorn
2010-06-11rely on Unicorn 0.991.0 for tests
2010-06-10add Rainbows::ServerToken middleware
Some folks can now show off their Rainbows! installation
2010-06-10my-tap-lib: fix race condition in verbose mode
Don't try to redirect until we know our FIFO consumers are ready for us. This only seems to happen with bash and not ksh... commit d0a0883eaaeec37800ca5cd07647b7b66a00c453 in Unicorn
2010-06-06tests: t9001: avoid needless filesystem activity
2010-06-04doc: update test suite README and link with RDoc
Apparently this document was completely forgotten over the course of development and never properly put on the website. The test suite is one of my favorite parts of Rainbows! and allows us to test the server as real clients would hit it.
2010-06-04tests: make -C $MODEL.tNNNN-foo.sh work again out-of-the box
It was missing dependencies on the first run
2010-06-04tests: cleanup isolate usage
We don't need tmp/ in our top level directory
2010-06-04tests: disable async_sinatra test for Ruby 1.9.2
Sinatra 0.9.4 does not appear to be compatible with Ruby 1.9.2...
2010-06-04test-lib: set NO_PROXY to counter http_proxy
Some testers (like myself) use http_proxy when isolating gems to avoid wasting bandwidth, but we don't proxy requests to localhost.
2010-06-03depend on Isolate ~> 2.0.2 for development
It's useful given all the Gems we support but don't have hard installation dependencies on.
2010-06-03add Rainbows::Sendfile middleware
This lets most concurrency models understand and process X-Sendfile efficiently with IO.copy_stream under Ruby 1.9. EventMachine can take advantage of this middleware under both Ruby 1.8 and Ruby 1.9.
2010-06-03writer_thread_*: fix static file response under 1.8
While these models are designed to work with IO.copy_stream under Ruby 1.9, it should be possible to run them under Ruby 1.8 without returning corrupt responses. The large file response test is beefed up to compare SHA1 checksums of the served file, not just sizes.
2010-06-03test-lib: remove ancient wait_for_pid() function
It hasn't been used since the first month of development when we started using FIFOs
2010-05-28tests: t0005: fudge the file malloc limit a bit
it's hard to make this test reliable, but try to add a small fudge factor based on the MRI default GC malloc limit.
2010-05-26add WriterThreadSpawn concurrency model
2010-05-22tests: ignore trash/ directory entirely
This allows it to be a symlink to /dev/shm or similar
2010-05-20tests: chunked client_body_max_size fails with old curl
curl < 7.18.0 did not check for errors when doing chunked uploads. Unfortunately some distros are slow moving and bundle ancient versions of curl.
2010-05-20tests: t0004: beef up test for kills
since we don't set maximum time boundaries, just rely on the logs to properly log the dead processes.
2010-05-20tests: t0004: disable upper limit check
since we've already waited for time to elapse, there's no point in watching the upper limit here
2010-05-20tests: t0005: minimize writes
This test can cause a lot of I/O, especially when run in parallel. Just rely on the fixed rsha1 code to compute the SHA1 of the response.
2010-05-20tests: fix sha1sum usage
non-random_blob arguments weren't being taken into account correctly :x
2010-05-20tests: t0005 - disable concurrency for this test
slow test runners can buffer us and bloat memory usage unpredictably when tests are run under load
2010-05-19tests: t0007: robustness fix
On busy sytems, this timing-sensitive test is likely to fail, so give it some extra slack
2010-05-14add WriterThreadPool concurrency model
This is based on an idea I originally had for Unicorn but never implemented in Unicorn since the benefits were unproven and the risks were too high.
2010-05-14test: do not let async-response run with Base
2010-05-04eventmachine: "rack.multithread" is always true when deferring
Since deferred requests run in a separate thread, this affects the root (non-deferred) thread as well since it may share data with other threads.
2010-05-04drop EventMachineDefer concurrency model
Since we have conditional deferred execution in the regular EventMachine concurrency model, we can drop this one. This concurrency model never fully worked due to lack of graceful shut downs, and was never promoted nor supported, either.
2010-05-04eventmachine: add app.deferred?(env) support as middleware
Merb (and possibly other) frameworks that support conditionally deferred app dispatch can now use it just like Ebb and Thin. http://brainspl.at/articles/2008/04/18/deferred-requests-with-merb-ebb-and-thin
2010-05-03t0100: rack-input-hammer tests identity encodings, too
It turns out we were painfully lacking in tests for HTTP requests where the Content-Length header _is_ set.
2010-05-03add client_max_body_size config directive
Since Rainbows! is supported when exposed directly to the Internet, administrators may want to limit the amount of data a user may upload in a single request body to prevent a denial-of-service via disk space exhaustion. This amount may be specified in bytes, the default limit being 1024*1024 bytes (1 megabyte). To override this default, a user may specify `client_max_body_size' in the Rainbows! block of their server config file: Rainbows! do client_max_body_size 10 * 1024 * 1024 end Clients that exceed the limit will get a "413 Request Entity Too Large" response if the request body is too large and the connection will close. For chunked requests, we have no choice but to interrupt during the client upload since we have no prior knowledge of the request body size.