<div dir="ltr"><div>hi,</div><div><br></div>I'd like to propose adding "+" and "/" to the list of characters to encode in the query string of a URL.<br><br>There is already a comment that says that we should not encode "/", but I think it might be wrong.<br><br>According to the RFC (<a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a>) the "/" is a reserved character.  The "Special Characters in URLs" section of <a href="http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/">http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/</a> touches on this a bit as well.<br><br>This is biting me because I'm trying to fetch my boot image using a Google Cloud Storage signed URL (<a href="https://cloud.google.com/storage/docs/access-control#Assembling-the-URL">https://cloud.google.com/storage/docs/access-control#Assembling-the-URL</a>) and it says : <div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><i>URLencode the signature you created. (The Base64 encoded signature may contain characters not legal in URLs (specifically + and /). These values must be replaced by safe encodings (%2B and %2F, respectively)</i>.</div></blockquote></blockquote><div><br>Here's the patch, if you decide to accept it.<br><br>Thank you!<br><br>Nicolas<div> </div><div><div><font face="monospace, monospace">--- a/src/core/uri.c</font></div><div><font face="monospace, monospace">+++ b/src/core/uri.c</font></div><div><font face="monospace, monospace">@@ -138,10 +138,9 @@ static int uri_character_escaped ( char c, unsigned int field ) {</font></div><div><font face="monospace, monospace">                 * appears within paths.</font></div><div><font face="monospace, monospace">                 */</font></div><div><font face="monospace, monospace">                [URI_PATH]      = "#:@?",</font></div><div><font face="monospace, monospace">-               /* Query: escape everything except '/', which</font></div><div><font face="monospace, monospace">-                * sometimes appears within queries.</font></div><div><font face="monospace, monospace">+               /* Query: escape everything.</font></div><div><font face="monospace, monospace">                 */</font></div><div><font face="monospace, monospace">-               [URI_QUERY]     = "#:@?",</font></div><div><font face="monospace, monospace">+               [URI_QUERY]     = "/#:@?+",</font></div><div><font face="monospace, monospace">                /* Fragment: escape everything */</font></div><div><font face="monospace, monospace">                [URI_FRAGMENT]  = "/#:@?",</font></div><div><font face="monospace, monospace">        };</font></div></div></div><div><br></div></div>