[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8622: 24.0.50; url-parse does not implement RFC3986 5.2

From: Julien Danjou
Subject: bug#8622: 24.0.50; url-parse does not implement RFC3986 5.2
Date: Sun, 11 Sep 2011 17:53:37 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

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:


If you use Firefox, Chromium, wget, or whatever to retrieve it, the
program will act according to RFC3986 and transform that URL to:


`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
=> That works

(switch-to-buffer (url-retrieve-synchronously
=> 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)...
Connecting to www.gnu.org (www.gnu.org)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30195 (29K) [image/jpeg]
Saving to: `t-desktop-4-small.jpg'

 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

Attachment: pgp4ceB8S4OQC.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]