From 604f1ed1227dcfd3fb18c1656bf25dfd191a3f1b Mon Sep 17 00:00:00 2001 From: benoitc Date: Mon, 21 Mar 2016 10:37:46 +0100 Subject: [PATCH] add more chars to pass in pathencode following https://src.chromium.org/viewvc/chrome/trunk/src/url/url_canon_path.cc?pathrev=265120#l60 add more path to the encoded vars. fix #246 fix #272 --- src/hackney_url.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hackney_url.erl b/src/hackney_url.erl index 530512f8..99d80f0b 100644 --- a/src/hackney_url.erl +++ b/src/hackney_url.erl @@ -277,7 +277,9 @@ urlencode(<>, Acc, P=Plus, U=Upper) -> if C >= $0, C =< $9 -> urlencode(Rest, <>, P, U); C >= $A, C =< $Z -> urlencode(Rest, <>, P, U); C >= $a, C =< $z -> urlencode(Rest, <>, P, U); - C =:= $.; C =:= $-; C =:= $~; C =:= $_ -> + C =:= $.; C =:= $-; C =:= $~; C =:= $_ , C =:= $*, C =:= $@ -> + urlencode(Rest, <>, P, U); + C =:= $(; C =:= $); C =:= $!, C =:= $$ -> urlencode(Rest, <>, P, U); C =:= $ , Plus -> urlencode(Rest, <>, P, U);