diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-03-26 20:00:18 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-03-26 20:04:40 -0700 |
commit | 4619d902fb16f8eca76ea45948849490238879f9 (patch) | |
tree | 1c8205e0e1b351220d64993d715a212a2fe6a400 /t/async_examples | |
parent | d5d5658b927798c9f5c4aab9808c3c4386a51f14 (diff) | |
download | rainbows-4619d902fb16f8eca76ea45948849490238879f9.tar.gz |
Unicorn stopped reading all config.ru files as binary starting with 0.97.0 for compatibility with rackup(1), so systems that defaulted to US-ASCII encoding would have trouble running this.
Diffstat (limited to 't/async_examples')
-rw-r--r-- | t/async_examples/async_app.ru | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/async_examples/async_app.ru b/t/async_examples/async_app.ru index 328effb..29f10f0 100644 --- a/t/async_examples/async_app.ru +++ b/t/async_examples/async_app.ru @@ -89,16 +89,16 @@ class AsyncApp # Get the headers out there asap, let the client know we're alive... EventMachine::next_tick { env['async.callback'].call [200, {'Content-Type' => 'text/plain'}, body] } - # Semi-emulate a long db request, instead of a timer, in reality we'd be - # waiting for the response data. Whilst this happens, other connections + # Semi-emulate a long db request, instead of a timer, in reality we'd be + # waiting for the response data. Whilst this happens, other connections # can be serviced. # This could be any callback based thing though, a deferrable waiting on - # IO data, a db request, an http request, an smtp send, whatever. + # IO data, a db request, an http request, an smtp send, whatever. EventMachine::add_timer(1) { body.call ["Woah, async!\n"] EventMachine::next_tick { - # This could actually happen any time, you could spawn off to new + # This could actually happen any time, you could spawn off to new # threads, pause as a good looking lady walks by, whatever. # Just shows off how we can defer chunks of data in the body, you can # even call this many times. @@ -116,11 +116,11 @@ end # The additions to env for async.connection and async.callback absolutely # destroy the speed of the request if Lint is doing it's checks on env. -# It is also important to note that an async response will not pass through -# any further middleware, as the async response notification has been passed -# right up to the webserver, and the callback goes directly there too. +# It is also important to note that an async response will not pass through +# any further middleware, as the async response notification has been passed +# right up to the webserver, and the callback goes directly there too. # Middleware could possibly catch :async, and also provide a different -# async.connection and async.callback. +# async.connection and async.callback. # use Rack::Lint run AsyncApp.new |