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.
10 UNICORN_VERSION="0.99.0"
12 DEFAULT_HOST = "0.0.0.0" # default TCP listen host address
13 DEFAULT_PORT = 8080 # default TCP listen port
14 DEFAULT_LISTEN = "#{DEFAULT_HOST}:#{DEFAULT_PORT}"
16 # The basic max request size we'll try to read.
17 CHUNK_SIZE=(16 * 1024)
19 # Maximum request body size before it is moved out of memory and into a
20 # temporary file for reading (112 kilobytes).
23 # common errors we'll send back
24 ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
25 ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
26 EXPECT_100_RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n"
28 # A frozen format for this is about 15% faster
29 REMOTE_ADDR="REMOTE_ADDR".freeze
30 RACK_INPUT="rack.input".freeze
31 HTTP_EXPECT="HTTP_EXPECT"