diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-06-10 22:39:01 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-06-10 22:42:36 -0700 |
commit | d01c5df960546462e8f5f458131d78689342d6aa (patch) | |
tree | 67730c048cab71dd72958b1d2067b345d150c3bb | |
parent | b065cab4fa5ca25302220c20563398a57069ae08 (diff) | |
download | rainbows-d01c5df960546462e8f5f458131d78689342d6aa.tar.gz |
Yes, this concurrency model is our strangest yet.
-rw-r--r-- | lib/rainbows/stream_response_epoll.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rainbows/stream_response_epoll.rb b/lib/rainbows/stream_response_epoll.rb index 9ded810..ed13c05 100644 --- a/lib/rainbows/stream_response_epoll.rb +++ b/lib/rainbows/stream_response_epoll.rb @@ -2,12 +2,13 @@ require "sleepy_penguin" require "raindrops" -# Like \Unicorn itself, this concurrency model is only intended for use -# behind nginx and completely unsupported otherwise. +# Like Unicorn itself, this concurrency model is only intended for use +# behind nginx and completely unsupported otherwise. Even further from +# Unicorn, this isn't even a good idea with normal LAN clients, only nginx! # # It does NOT require a thread-safe Rack application at any point, but -# allows streaming data asynchronously via nginx (using the the -# "X-Accel-Buffering: no" header). +# allows streaming data asynchronously via nginx (using the +# "X-Accel-Buffering: no" header to disable buffering). # # Unlike Rainbows::Base, this does NOT support persistent # connections or pipelining. All \Rainbows! specific configuration @@ -28,6 +29,8 @@ module Rainbows::StreamResponseEpoll ep_client = false if headers + # don't set extra headers here, this is only intended for + # consuming by nginx. buf = "HTTP/1.0 #{status}\r\nStatus: #{status}\r\n" headers.each do |key, value| if value =~ /\n/ |