From acd6847d3df2d0bca923918bdc5040e9b68c9b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 18 Jan 2013 18:09:46 +0100 Subject: Set max_keepalive default to 100 instead of infinity --- src/cowboy_protocol.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cowboy_protocol.erl') diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index 0e9982b..a0f571b 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -30,7 +30,7 @@ %%
max_headers
Max number of headers allowed. %% Defaults to 100.
%%
max_keepalive
Max number of requests allowed in a single -%% keep-alive session. Defaults to infinity.
+%% keep-alive session. Defaults to 100. %%
max_request_line_length
Max length allowed for the request %% line. Defaults to 4096.
%%
middlewares
The list of middlewares to execute when a @@ -107,7 +107,7 @@ init(ListenerPid, Socket, Transport, Opts) -> MaxHeaderNameLength = get_value(max_header_name_length, Opts, 64), MaxHeaderValueLength = get_value(max_header_value_length, Opts, 4096), MaxHeaders = get_value(max_headers, Opts, 100), - MaxKeepalive = get_value(max_keepalive, Opts, infinity), + MaxKeepalive = get_value(max_keepalive, Opts, 100), MaxRequestLineLength = get_value(max_request_line_length, Opts, 4096), Middlewares = get_value(middlewares, Opts, [cowboy_router, cowboy_handler]), Env = [{listener, ListenerPid}|get_value(env, Opts, [])], -- cgit v1.2.3