diff options
author | Loïc Hoguin <[email protected]> | 2013-04-11 23:28:37 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-04-11 23:28:37 +0200 |
commit | 55cd18e4d831db88eaa866723a423279db99fd38 (patch) | |
tree | f7ed65992c76a84d8740f4aefb57fbbf9a0be9ed /src | |
parent | 5b9404fd077dd66f3bbb19b11864eac5e4c0218b (diff) | |
parent | 1372c13034c76f8c69c9f4dce6a9d0b74cb54586 (diff) | |
download | cowboy-55cd18e4d831db88eaa866723a423279db99fd38.tar.gz cowboy-55cd18e4d831db88eaa866723a423279db99fd38.tar.bz2 cowboy-55cd18e4d831db88eaa866723a423279db99fd38.zip |
Merge branch 'iolist_path_support' of git://github.com/tsloughter/cowboy
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_router.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_router.erl b/src/cowboy_router.erl index 7c86653..91912d8 100644 --- a/src/cowboy_router.erl +++ b/src/cowboy_router.erl @@ -37,7 +37,7 @@ | {atom(), function, fun ((binary()) -> true | {true, any()} | false)}]. -export_type([constraints/0]). --type route_match() :: '_' | binary() | string(). +-type route_match() :: '_' | iodata(). -type route_path() :: {Path::route_match(), Handler::module(), Opts::any()} | {Path::route_match(), constraints(), Handler::module(), Opts::any()}. -type route_rule() :: {Host::route_match(), Paths::[route_path()]} @@ -88,7 +88,7 @@ compile_paths([{PathMatch, Handler, Opts}|Tail], Acc) -> compile_paths([{PathMatch, [], Handler, Opts}|Tail], Acc); compile_paths([{PathMatch, Constraints, Handler, Opts}|Tail], Acc) when is_list(PathMatch) -> - compile_paths([{list_to_binary(PathMatch), + compile_paths([{iolist_to_binary(PathMatch), Constraints, Handler, Opts}|Tail], Acc); compile_paths([{'_', Constraints, Handler, Opts}|Tail], Acc) -> compile_paths(Tail, [{'_', Constraints, Handler, Opts}] ++ Acc); |