unicorn 3.4.0 - for people with very big LANs
[unicorn.git] / lib / unicorn / const.rb
blob8a65a54436ab63f1bcc44557f545c707a0f699aa
1 # -*- encoding: binary -*-
3 # Frequently used constants when constructing requests or responses.
4 # Many times the constant just refers to a string with the same
5 # contents.  Using these constants gave about a 3% to 10% performance
6 # improvement over using the strings directly.  Symbols did not really
7 # improve things much compared to constants.
8 module Unicorn::Const
10   # The current version of Unicorn, currently 3.4.0
11   UNICORN_VERSION = "3.4.0"
13   # default TCP listen host address (0.0.0.0, all interfaces)
14   DEFAULT_HOST = "0.0.0.0"
16   # default TCP listen port (8080)
17   DEFAULT_PORT = 8080
19   # default TCP listen address and port (0.0.0.0:8080)
20   DEFAULT_LISTEN = "#{DEFAULT_HOST}:#{DEFAULT_PORT}"
22   # The basic request body size we'll try to read at once (16 kilobytes).
23   CHUNK_SIZE = 16 * 1024
25   # Maximum request body size before it is moved out of memory and into a
26   # temporary file for reading (112 kilobytes).  This is the default
27   # value of of client_body_buffer_size.
28   MAX_BODY = 1024 * 112
30   # :stopdoc:
31   # common errors we'll send back
32   ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
33   ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
34   EXPECT_100_RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n"
36   HTTP_EXPECT = "HTTP_EXPECT"
37   # :startdoc:
38 end