Browse Source

Don't accept TRACE or CONNECT methods by default in REST

For the simple reason that the REST code does nothing about
them.
Loïc Hoguin 12 years ago
parent
commit
ae45cecfcd
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/cowboy_rest.erl

+ 2 - 3
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);