aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_http_protocol.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index ca23aa9..3388f0d 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -69,7 +69,9 @@ request({http_request, Method, {abs_path, AbsPath}, Version},
wait_header(#http_req{socket=Socket, transport=Transport, method=Method,
version=Version, peer=Peer, path=Path, raw_qs=Qs}, State);
request({http_error, "\r\n"}, State) ->
- wait_request(State).
+ wait_request(State);
+request({http_error, _Any}, State) ->
+ error_terminate(400, State).
-spec wait_header(Req::#http_req{}, State::#state{}) -> ok.
%% @todo We don't want to wait T at each header...