mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
cowboy_rest: Always set the Allow header
Not just on 405 responses or OPTIONS requests.
This commit is contained in:
parent
58402b4162
commit
f316a65906
2 changed files with 11 additions and 30 deletions
|
@ -817,6 +817,7 @@ provide_callback(Config) ->
|
|||
]),
|
||||
{response, nofin, 200, Headers} = gun:await(ConnPid, Ref),
|
||||
{_, <<"text/plain">>} = lists:keyfind(<<"content-type">>, 1, Headers),
|
||||
{_, <<"HEAD, GET, OPTIONS">>} = lists:keyfind(<<"allow">>, 1, Headers),
|
||||
{ok, <<"This is REST!">>} = gun:await_body(ConnPid, Ref),
|
||||
ok.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue