[Yum-devel] URLGrabber and escaping characters in http request

Toshio Kuratomi a.badger at gmail.com
Tue Sep 25 01:34:15 UTC 2012


On Mon, Sep 24, 2012 at 08:26:39PM +0100, andrea wrote:
> On 09/24/2012 08:21 AM, Zdenek Pavlas wrote:
> >> Any idea how to make it work.
> > 
> > Add the quote=0 option.
> > 
> > urlgrabber.urlgrab('http://localhost:2000/A,B,C')
> > => GET /A%2CB%2CC HTTP/1.1
> > 
> > urlgrabber.urlgrab('http://localhost:2000/A,B,C', quote=0)
> > => GET /A,B,C HTTP/1.1
> > 
> 
> Thank you.
> Yes, this is good enough for this case.
> 
> As I understand, there isn't an exact standard,
> but there seems to be a "standard behaviour" (i.e.: wget, curl, Firefox, Safari).
>
The RFCs are the standard.

http://www.ietf.org/rfc/rfc2396.txt

See Sections 2.1, 2.4.2


"""
In some cases, data that could be represented by an unreserved
character may appear escaped; for example, some of the unreserved
"mark" characters are automatically escaped by some systems.  If the
given URI scheme defines a canonicalization algorithm, then
unreserved characters may be unescaped according to that algorithm.  For
example, "%7e" is sometimes used instead of "~" in an http URL path, but the
two are equivalent for an http URL.
"""

Your server is not handling this correctly.


-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20120924/3b1c7660/attachment.asc>


More information about the Yum-devel mailing list