[gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded
Even Rouault
even.rouault at mines-paris.org
Tue Jun 17 14:24:20 PDT 2014
Le lundi 16 juin 2014 14:20:59, Timothy Astle a écrit :
> Hi all,
>
> Does anyone know why CPLEscapeString
> (https://svn.osgeo.org/gdal/trunk/gdal/port/cpl_string.cpp) character
> encodes characters that are valid as-is according to
> http://www.ietf.org/rfc/rfc1738.txt?
>
> I just hit a situation where I noticed the WMS driver is converting
> hyphens to %2D for layer names. The 3rd party server doesn't handle it
> (but it should) and this caught my attention.
>
> Any thoughts? Is it just a case where a patch would be welcome?
Tim,
What would your patch do ? Implement the following from RFC1738 ? :
"Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL."
Well, actually I think it should still encode the reserved characters (";",
"/", "?", ":", "@", "=" and "&"), since valid use cases of CPLEscapeString(,
CPLES_URL) might be do make sure that they are encoded.
Even
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list