diff options
author | Loïc Hoguin <[email protected]> | 2011-04-18 12:14:13 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-04-18 12:14:13 +0200 |
commit | ef2673b61eb640768c8e83c5c6847b50255b07a6 (patch) | |
tree | d97ea3af8f95e75dd061ed170080f9a24671000d | |
parent | ecf117b37508f864d084ed6560f95e32b9ede1ef (diff) | |
download | cowboy-ef2673b61eb640768c8e83c5c6847b50255b07a6.tar.gz cowboy-ef2673b61eb640768c8e83c5c6847b50255b07a6.tar.bz2 cowboy-ef2673b61eb640768c8e83c5c6847b50255b07a6.zip |
Rename dispatch() into dispatch_rules().
-rw-r--r-- | include/types.hrl | 2 | ||||
-rw-r--r-- | src/cowboy_dispatcher.erl | 3 | ||||
-rw-r--r-- | src/cowboy_http_protocol.erl | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/types.hrl b/include/types.hrl index d250f69..8bb94fb 100644 --- a/include/types.hrl +++ b/include/types.hrl @@ -24,4 +24,4 @@ -type dispatch_rule() :: {Host::match(), list({Path::match(), Handler::module(), Opts::term()})}. --type dispatch() :: list(dispatch_rule()). +-type dispatch_rules() :: list(dispatch_rule()). diff --git a/src/cowboy_dispatcher.erl b/src/cowboy_dispatcher.erl index 0743747..366aab8 100644 --- a/src/cowboy_dispatcher.erl +++ b/src/cowboy_dispatcher.erl @@ -39,7 +39,8 @@ split_path(Path) -> {string:tokens(Path2, "/"), Path2, Qs} end. --spec match(Host::path_tokens(), Path::path_tokens(), Dispatch::dispatch()) +-spec match(Host::path_tokens(), Path::path_tokens(), + Dispatch::dispatch_rules()) -> {ok, Handler::module(), Opts::term(), Binds::bindings()} | {error, notfound, host} | {error, notfound, path}. match(_Host, _Path, []) -> diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index 0094e8b..402224d 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -22,7 +22,7 @@ -record(state, { socket :: inet:socket(), transport :: module(), - dispatch :: dispatch(), + dispatch :: dispatch_rules(), handler :: {Handler::module(), Opts::term()}, req_empty_lines = 0 :: integer(), max_empty_lines :: integer(), |