diff --git a/src/hackney_lib/hackney_url.erl b/src/hackney_lib/hackney_url.erl index 023eee11..d29cd7a4 100644 --- a/src/hackney_lib/hackney_url.erl +++ b/src/hackney_lib/hackney_url.erl @@ -368,7 +368,9 @@ partial_pathencode(<> = Bin, Acc) -> if C >= $0, C =< $9 -> partial_pathencode(Rest, <>); C >= $A, C =< $Z -> partial_pathencode(Rest, <>); C >= $a, C =< $z -> partial_pathencode(Rest, <>); - C =:= $.; C =:= $-; C =:= $~; C =:= $_ -> + C =:= $;; C =:= $=; C =:= $,; C =:= $: -> + partial_pathencode(Rest, <>); + C =:= $.; C =:= $-; C =:= $+; C =:= $~; C =:= $_ -> partial_pathencode(Rest, <>); C =:= $ -> partial_pathencode(Rest, <>); diff --git a/test/hackney_url_tests.erl b/test/hackney_url_tests.erl index b3959fa2..300657a5 100644 --- a/test/hackney_url_tests.erl +++ b/test/hackney_url_tests.erl @@ -258,7 +258,8 @@ pathencode_test_() -> {<<"/path1/path2">>, <<"/path1/path2">>}, {<<"/path1/path2%2fa">>, <<"/path1/path2%2fa">>}, {<<"/path1/path2%2fa%2fb">>, <<"/path1/path2%2fa%2fb">>}, - {<<"/path1/path2%2test">>, <<"/path1/path2%252test">>} + {<<"/path1/path2%2test">>, <<"/path1/path2%252test">>}, + {<<"/id/name:107/name2;p=1,3">>, <<"/id/name:107/name2;p=1,3">>} ], [{V, fun() -> R = hackney_url:pathencode(V) end} || {V, R} <- Tests].