mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Make sure a path parsing error in the router gives a 400
This commit is contained in:
parent
b2bd9ccfb5
commit
6fc05a6d64
2 changed files with 9 additions and 3 deletions
|
@ -325,9 +325,8 @@ split_path(Path, Acc) ->
|
|||
<< Segment:Pos/binary, _:8, Rest/bits >> = Path,
|
||||
split_path(Rest, [Segment|Acc])
|
||||
end
|
||||
catch
|
||||
error:badarg ->
|
||||
badrequest
|
||||
catch error:_ ->
|
||||
badrequest
|
||||
end.
|
||||
|
||||
remove_dot_segments([], Acc) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue