GNU bug report logs -
#8622
24.0.50; url-parse does not implement RFC3986 5.2
Previous Next
Reported by: Julien Danjou <julien <at> danjou.info>
Date: Thu, 5 May 2011 16:15:02 UTC
Severity: normal
Tags: fixed
Found in version 24.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 8622 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Sep 11 2011, Andreas Schwab wrote:
> In which way does it not work? There is the scheme "http", the host
> "a", the port 80 and the local part "/../../../g". Everything is fully
> correct according to the rules of a URI. How the local part is
> interpreted is only defined by the remote host.
Men, this is getting me crazy. Let me rephrase the whole thing.
You got an URL of the form:
http://a/../../../foobar.png
If you use Firefox, Chromium, wget, or whatever to retrieve it, the
program will act according to RFC3986 and transform that URL to:
http://a/foobar.png
`url' from Emacs will not, and will fail to retrieve the image.
Now I may be mistaken about where in the code the bug is, but there's a
bug: the `url' functions are unable to fetch such an URL, whereas any
other tool is able to.
In Lisp:
(switch-to-buffer (url-retrieve-synchronously
"http://www.gnu.org/graphics/t-desktop-4-small.jpg"))
=> That works
(switch-to-buffer (url-retrieve-synchronously
"http://www.gnu.org/../graphics/t-desktop-4-small.jpg"))
=> Show a 400 bad request
% wget http://www.gnu.org/../graphics/t-desktop-4-small.jpg
--2011-09-11 17:52:56-- http://www.gnu.org/graphics/t-desktop-4-small.jpg
Resolving www.gnu.org (www.gnu.org)... 140.186.70.148
Connecting to www.gnu.org (www.gnu.org)|140.186.70.148|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30195 (29K) [image/jpeg]
Saving to: `t-desktop-4-small.jpg'
100%[=======================================================================================================================================================================================================================================>] 30,195 66.5K/s in 0.4s
2011-09-11 17:52:56 (66.5 KB/s) - `t-desktop-4-small.jpg' saved [30195/30195]
--
Julien Danjou
❱ http://julien.danjou.info
[Message part 2 (application/pgp-signature, inline)]
This bug report was last modified 7 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.