aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-10-04 10:54:30 +0200
committerLoïc Hoguin <[email protected]>2011-10-04 10:54:30 +0200
commitd25c30790cc3afae03838a160f87ca0acd745989 (patch)
tree0f425a5fe6079f4140a72a87c3bc34fc6f6efbf2 /src/cowboy_http_protocol.erl
parent986630d9ad70a1ae82954a7bfedc976a1b8b7294 (diff)
downloadcowboy-d25c30790cc3afae03838a160f87ca0acd745989.tar.gz
cowboy-d25c30790cc3afae03838a160f87ca0acd745989.tar.bz2
cowboy-d25c30790cc3afae03838a160f87ca0acd745989.zip
Do not send a 408 response if the Request-Line wasn't fully received
The server should not send a response if there wasn't at least the beginning of a request sent (the Request-Line).
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index 40dc51c..14cd8d3 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -87,8 +87,7 @@ wait_request(State=#state{socket=Socket, transport=Transport,
case Transport:recv(Socket, 0, T) of
{ok, Data} -> parse_request(State#state{
buffer= << Buffer/binary, Data/binary >>});
- {error, timeout} -> error_terminate(408, State);
- {error, closed} -> terminate(State)
+ {error, _Reason} -> terminate(State)
end.
-spec request({http_request, http_method(), http_uri(),