aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-09-21 09:18:56 +0200
committerLoïc Hoguin <[email protected]>2012-09-21 09:18:56 +0200
commit34021666cbf626e979ea136664b1f8beca893d6f (patch)
treec5c56ca56b6540c42f84278221b442096edf61b0 /src/cowboy_http.erl
parent8497c8bbcdcfd8754c500e65557ee09d9bd1bed0 (diff)
downloadcowboy-34021666cbf626e979ea136664b1f8beca893d6f.tar.gz
cowboy-34021666cbf626e979ea136664b1f8beca893d6f.tar.bz2
cowboy-34021666cbf626e979ea136664b1f8beca893d6f.zip
Don't use decode_packet/3 for parsing the headers
Header names are now binaries. Since header names are case insensitive they are all converted to lowercase. For example: <<"content-length">>. The max_line_length option was removed. Three new options have been added instead: * max_request_line_length (defaults to 4096) * max_header_name_length (defaults to 64) * max_header_value_length (defaults to 4096)
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r--src/cowboy_http.erl16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 83a67fe..9c38fae 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -56,25 +56,11 @@
| {scheme, Scheme::binary(), binary()}
| {abs_path, binary()} | binary().
-type version() :: {Major::non_neg_integer(), Minor::non_neg_integer()}.
--type header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
- | 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
- | 'Accept-Encoding' | 'Accept-Language' | 'Authorization' | 'From' | 'Host'
- | 'If-Modified-Since' | 'If-Match' | 'If-None-Match' | 'If-Range'
- | 'If-Unmodified-Since' | 'Max-Forwards' | 'Proxy-Authorization' | 'Range'
- | 'Referer' | 'User-Agent' | 'Age' | 'Location' | 'Proxy-Authenticate'
- | 'Public' | 'Retry-After' | 'Server' | 'Vary' | 'Warning'
- | 'Www-Authenticate' | 'Allow' | 'Content-Base' | 'Content-Encoding'
- | 'Content-Language' | 'Content-Length' | 'Content-Location'
- | 'Content-Md5' | 'Content-Range' | 'Content-Type' | 'Etag'
- | 'Expires' | 'Last-Modified' | 'Accept-Ranges' | 'Set-Cookie'
- | 'Set-Cookie2' | 'X-Forwarded-For' | 'Cookie' | 'Keep-Alive'
- | 'Proxy-Connection' | binary().
--type headers() :: [{header(), iodata()}].
+-type headers() :: [{binary(), iodata()}].
-type status() :: non_neg_integer() | binary().
-export_type([uri/0]).
-export_type([version/0]).
--export_type([header/0]).
-export_type([headers/0]).
-export_type([status/0]).