0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00

Improve errors when the path provided is incorrect

This commit is contained in:
Loïc Hoguin 2012-12-18 15:59:34 +01:00
parent 06ab46c868
commit f48902cee7

View file

@ -139,7 +139,9 @@ split_host(Host, Acc) ->
%% and part of a path segment. %% and part of a path segment.
-spec split_path(binary()) -> tokens(). -spec split_path(binary()) -> tokens().
split_path(<< $/, Path/bits >>) -> split_path(<< $/, Path/bits >>) ->
split_path(Path, []). split_path(Path, []);
split_path(_) ->
badrequest.
split_path(Path, Acc) -> split_path(Path, Acc) ->
try try