unicorn 2.x updates + kgio
[rainbows.git] / lib / rainbows / const.rb
blob1c77c76e10192d8986f2e3ccb0e5329b61c55af0
1 # -*- encoding: binary -*-
2 # :enddoc:
3 module Rainbows
5   module Const
6     RAINBOWS_VERSION = '0.97.0'
8     include Unicorn::Const
10     RACK_DEFAULTS = Unicorn::HttpRequest::DEFAULTS.update({
11       "SERVER_SOFTWARE" => "Rainbows! #{RAINBOWS_VERSION}",
13       # using the Rev model, we'll automatically chunk pipe and socket objects
14       # if they're the response body.  Unset by default.
15       # "rainbows.autochunk" => false,
16     })
18     # client IO object that supports reading and writing directly
19     # without filtering it through the HTTP chunk parser.
20     # Maybe we can get this renamed to "rack.io" if it becomes part
21     # of the official spec, but for now it is "hack.io"
22     CLIENT_IO = "hack.io".freeze
24     ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n"
25     ERROR_416_RESPONSE = "HTTP/1.1 416 Requested Range Not Satisfiable\r\n\r\n"
27     RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT
28     REMOTE_ADDR = Unicorn::HttpRequest::REMOTE_ADDR
29   end
30 end