0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Reply with error 400 on all bad Request-Lines received.

This commit is contained in:
Loïc Hoguin 2011-03-19 14:40:39 +01:00
parent c9eb3ce5fc
commit 7ef67d08fe

View file

@ -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...