diff options
author | Loïc Hoguin <[email protected]> | 2013-04-11 21:25:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-04-11 22:25:36 +0200 |
commit | ae45cecfcd2b9291d34ed1897b50b192018b517d (patch) | |
tree | ea34ca131250674bc11defb8137417d6ce63ef90 /src | |
parent | 5a171d0f8050eda4e43de82efb7f2508be314ee6 (diff) | |
download | cowboy-ae45cecfcd2b9291d34ed1897b50b192018b517d.tar.gz cowboy-ae45cecfcd2b9291d34ed1897b50b192018b517d.tar.bz2 cowboy-ae45cecfcd2b9291d34ed1897b50b192018b517d.zip |
Don't accept TRACE or CONNECT methods by default in REST
For the simple reason that the REST code does nothing about
them.
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_rest.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index b11a29a..526f102 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -96,9 +96,8 @@ known_methods(Req, State=#state{method=Method}) -> case call(Req, State, known_methods) of no_call when Method =:= <<"HEAD">>; Method =:= <<"GET">>; Method =:= <<"POST">>; Method =:= <<"PUT">>; - Method =:= <<"DELETE">>; Method =:= <<"TRACE">>; - Method =:= <<"CONNECT">>; Method =:= <<"OPTIONS">>; - Method =:= <<"PATCH">> -> + Method =:= <<"PATCH">>; Method =:= <<"DELETE">>; + Method =:= <<"OPTIONS">> -> next(Req, State, fun uri_too_long/2); no_call -> next(Req, State, 501); |