mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Reply status 400 if we receive an unexpected value or error for headers
This commit is contained in:
parent
e550ba7cd3
commit
f81cb89b54
1 changed files with 2 additions and 2 deletions
|
@ -199,8 +199,8 @@ header(http_eoh, Req=#http_req{version={1, 0}, transport=Transport,
|
|||
port=Port, buffer=Buffer}, State#state{buffer= <<>>});
|
||||
header(http_eoh, Req, State=#state{buffer=Buffer}) ->
|
||||
handler_init(Req#http_req{buffer=Buffer}, State#state{buffer= <<>>});
|
||||
header({http_error, _Bin}, _Req, State) ->
|
||||
error_terminate(500, State).
|
||||
header(_Any, _Req, State) ->
|
||||
error_terminate(400, State).
|
||||
|
||||
-spec dispatch(fun((#http_req{}, #state{}) -> ok),
|
||||
#http_req{}, #state{}) -> ok | none().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue