rainbows.git  about / heads / tags
Unicorn for sleepy apps and slow clients
blob 992e13862f0413d1f189154ba5ade701db91cef9 889 bytes (raw)
$ git show v0.95.1:lib/rainbows/const.rb	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
# -*- encoding: binary -*-
# :enddoc:
module Rainbows

  module Const
    RAINBOWS_VERSION = '0.95.1'

    include Unicorn::Const

    RACK_DEFAULTS = Unicorn::HttpRequest::DEFAULTS.update({
      "SERVER_SOFTWARE" => "Rainbows! #{RAINBOWS_VERSION}",

      # using the Rev model, we'll automatically chunk pipe and socket objects
      # if they're the response body.  Unset by default.
      # "rainbows.autochunk" => false,
    })

    CONN_CLOSE = "Connection: close\r\n"
    CONN_ALIVE = "Connection: keep-alive\r\n"

    # client IO object that supports reading and writing directly
    # without filtering it through the HTTP chunk parser.
    # Maybe we can get this renamed to "rack.io" if it becomes part
    # of the official spec, but for now it is "hack.io"
    CLIENT_IO = "hack.io".freeze

    ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n"

  end
end

git clone https://yhbt.net/rainbows.git