mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Improve errors when the path provided is incorrect
This commit is contained in:
parent
06ab46c868
commit
f48902cee7
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue