1 # -*- encoding: binary -*-
5 # Frequently used constants when constructing requests or responses. Many times
6 # the constant just refers to a string with the same contents. Using these constants
7 # gave about a 3% to 10% performance improvement over using the strings directly.
8 # Symbols did not really improve things much compared to constants.
11 # The current version of Unicorn, currently 1.1.4
12 UNICORN_VERSION="1.1.4"
14 DEFAULT_HOST = "0.0.0.0" # default TCP listen host address
15 DEFAULT_PORT = 8080 # default TCP listen port
16 DEFAULT_LISTEN = "#{DEFAULT_HOST}:#{DEFAULT_PORT}"
18 # The basic max request size we'll try to read.
19 CHUNK_SIZE=(16 * 1024)
21 # Maximum request body size before it is moved out of memory and into a
22 # temporary file for reading (112 kilobytes).
25 # common errors we'll send back
26 ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
27 ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
28 EXPECT_100_RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n"
30 # A frozen format for this is about 15% faster
31 REMOTE_ADDR="REMOTE_ADDR".freeze
32 RACK_INPUT="rack.input".freeze
33 HTTP_EXPECT="HTTP_EXPECT"