[ipxe-devel] uri_encode and special characters.

Christian Nilsson nikize at gmail.com
Wed May 6 00:08:35 UTC 2015

On Wed, May 6, 2015 at 1:42 AM, Nicolas Sylvain <nsylvain at gmail.com> wrote:
> hi,
> I'd like to propose adding "+" and "/" to the list of characters to encode
> in the query string of a URL.
> There is already a comment that says that we should not encode "/", but I
> think it might be wrong.
> According to the RFC (http://tools.ietf.org/html/rfc3986) the "/" is a
> reserved character.  The "Special Characters in URLs" section of
> http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/
> touches on this a bit as well.
> This is biting me because I'm trying to fetch my boot image using a Google
> Cloud Storage signed URL
> (https://cloud.google.com/storage/docs/access-control#Assembling-the-URL)
> and it says :
> 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).
> Here's the patch, if you decide to accept it.
> Thank you!
> Nicolas

I agree that the current implementation is missing this, and more.
Have started to add tests based on Robins
Those includes & and / add + to that and we got most of it.
Also wants to have tests in place for base64 containing as you note +
and / for params post data

What would be interesting is examples of fields and situations where
these chars should not be encoded, for example is it an issue to
encode everything in username and password?

By moving most to "always" it should be possible to simplify the code
and still add functionality?

Unfortunately other things got in the way - so don't know when I can
continue that work.


More information about the ipxe-devel mailing list