From 4619d902fb16f8eca76ea45948849490238879f9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 26 Mar 2010 20:00:18 -0700 Subject: async_examples/async_app: avoid needless UTF-8 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. --- t/async_examples/async_app.ru | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 't') 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 -- cgit v1.2.3-24-ge0c7