From: Julien Danjou <julien@danjou.info>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>, 8622@debbugs.gnu.org
Subject: bug#8622: 24.0.50; url-parse does not implement RFC3986 5.2
Date: Sun, 11 Sep 2011 17:53:37 +0200 [thread overview]
Message-ID: <877h5f5b3y.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <m28vpvgk00.fsf@igel.home> (Andreas Schwab's message of "Sun, 11 Sep 2011 17:46:07 +0200")
[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2011-09-11 15:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 16:14 bug#8622: 24.0.50; url-parse does not implement RFC3986 5.2 Julien Danjou
2011-09-11 4:36 ` Lars Magne Ingebrigtsen
2011-09-11 12:03 ` Julien Danjou
2011-09-11 14:00 ` Andreas Schwab
2011-09-11 14:39 ` Julien Danjou
2011-09-11 15:21 ` Andreas Schwab
2011-09-11 15:26 ` Julien Danjou
2011-09-11 15:46 ` Andreas Schwab
2011-09-11 15:53 ` Julien Danjou [this message]
2011-09-11 16:04 ` Lars Magne Ingebrigtsen
2011-09-11 16:15 ` Julien Danjou
2011-09-11 16:19 ` Lars Magne Ingebrigtsen
2011-09-11 16:26 ` Julien Danjou
2011-09-11 16:30 ` Lars Magne Ingebrigtsen
2011-09-11 16:39 ` Julien Danjou
2011-09-11 16:37 ` Lars Magne Ingebrigtsen
2011-09-11 16:47 ` Julien Danjou
2011-09-11 16:34 ` Lars Magne Ingebrigtsen
2015-12-25 22:05 ` Lars Ingebrigtsen
2018-04-15 20:14 ` Lars Ingebrigtsen
2011-09-11 18:53 ` Lars Magne Ingebrigtsen
2011-09-11 16:09 ` Andreas Schwab
2011-09-11 15:20 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877h5f5b3y.fsf@keller.adm.naquadah.org \
--to=julien@danjou.info \
--cc=8622@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).