aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-03-19 02:21:55 +0100
committerLoïc Hoguin <[email protected]>2011-03-19 02:21:55 +0100
commit2131a935e6a9b602ce068359cae6164d43f8cb57 (patch)
tree0b257467bc716b7ab168505d460be961d51a711d /src/cowboy_http_protocol.erl
parent408f167621848e8cc56a184d7e9e5a891fb740a2 (diff)
downloadcowboy-2131a935e6a9b602ce068359cae6164d43f8cb57.tar.gz
cowboy-2131a935e6a9b602ce068359cae6164d43f8cb57.tar.bz2
cowboy-2131a935e6a9b602ce068359cae6164d43f8cb57.zip
Notify the client that we're closing the connection after the error reply.
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index 6af10fd..6aff959 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -139,10 +139,9 @@ handler_terminate(HandlerState, Req, State=#state{handler={Handler, _Opts}}) ->
end.
-spec error_terminate(Code::http_status(), State::#state{}) -> ok.
-error_terminate(Code, State=#state{socket=Socket, transport=Transport,
- connection=Connection}) ->
+error_terminate(Code, State=#state{socket=Socket, transport=Transport}) ->
cowboy_http_req:reply(Code, [], [], #http_req{socket=Socket,
- transport=Transport, connection=Connection}),
+ transport=Transport, connection=close}),
terminate(State).
-spec terminate(State::#state{}) -> ok.