diff options
author | Loïc Hoguin <[email protected]> | 2017-01-31 18:50:32 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-01-31 18:50:32 +0100 |
commit | 844115826044db2be3bc23392c21ecffada10a24 (patch) | |
tree | a0f81965ddc3a7f013f8fa4b60db29155df7e1d7 /src/cowboy_router.erl | |
parent | 3b4de4384ae2d6ac9de82a6565d18bba2bf8a6ab (diff) | |
download | cowboy-844115826044db2be3bc23392c21ecffada10a24.tar.gz cowboy-844115826044db2be3bc23392c21ecffada10a24.tar.bz2 cowboy-844115826044db2be3bc23392c21ecffada10a24.zip |
Fix wrong path url decoding algorithm
I embed cow_uri since I can't update Cowlib further easily.
This is most likely a one shot release so it shouldn't be
a problem to do things a little more dirty than usual.
Diffstat (limited to 'src/cowboy_router.erl')
-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 ef91c6d..d2dc0d2 100644 --- a/src/cowboy_router.erl +++ b/src/cowboy_router.erl @@ -326,9 +326,9 @@ split_path(Path, Acc) -> try case binary:match(Path, <<"/">>) of nomatch when Path =:= <<>> -> - lists:reverse([cow_qs:urldecode(S) || S <- Acc]); + lists:reverse([cow_uri:urldecode(S) || S <- Acc]); nomatch -> - lists:reverse([cow_qs:urldecode(S) || S <- [Path|Acc]]); + lists:reverse([cow_uri:urldecode(S) || S <- [Path|Acc]]); {Pos, _} -> << Segment:Pos/binary, _:8, Rest/bits >> = Path, split_path(Rest, [Segment|Acc]) |