From 65c5d576c85ff61b75d590545942d8a549c83e02 Mon Sep 17 00:00:00 2001 From: Josh Allmann Date: Sat, 13 Oct 2012 15:15:15 -0700 Subject: Clarify docs for known_methods and allowed_methods. --- src/cowboy_rest.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index c0decbd..61062ab 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -84,7 +84,7 @@ upgrade(_ListenerPid, Handler, Opts, Req) -> service_available(Req, State) -> expect(Req, State, service_available, true, fun known_methods/2, 503). -%% known_methods/2 should return a list of atoms or binary methods. +%% known_methods/2 should return a list of binary methods. known_methods(Req, State=#state{method=Method}) -> case call(Req, State, known_methods) of no_call when Method =:= <<"HEAD">>; Method =:= <<"GET">>; @@ -107,7 +107,7 @@ known_methods(Req, State=#state{method=Method}) -> uri_too_long(Req, State) -> expect(Req, State, uri_too_long, false, fun allowed_methods/2, 414). -%% allowed_methods/2 should return a list of atoms or binary methods. +%% allowed_methods/2 should return a list of binary methods. allowed_methods(Req, State=#state{method=Method}) -> case call(Req, State, allowed_methods) of no_call when Method =:= <<"HEAD">>; Method =:= <<"GET">> -> -- cgit v1.2.3