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