GNU bug report logs -
#24117
25.1; url-http-create-request: Multibyte text in HTTP request
Previous Next
Reported by: Sho Takemori <stakemorii <at> gmail.com>
Date: Sun, 31 Jul 2016 08:28:02 UTC
Severity: normal
Found in version 25.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: stakemorii <at> gmail.com, 24117 <at> debbugs.gnu.org,
> Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Wed, 3 Aug 2016 05:39:31 +0300
>
> On 08/02/2016 06:25 PM, Eli Zaretskii wrote:
>
> > How about making the temporary buffer parsed by url-generic-parse-url
> > a unibyte buffer? Does that fix the problem?
>
> It does fix anaconda-mode, yes.
Hmm, but url-generic-parse-url is called from gazillion other places,
so maybe this is not safe.
> > AFAIU, RFC 3986 doesn't
> > allow non-ASCII characters, so we should be okay handling that in a
> > unibyte buffer, right?
>
> I don't really know. RFC 3986 or not, I suppose in practice the url
> could be quoted before or after it's parsed. And url-parse-tests.el
> doesn't specify this case.
No, I meant that since RFC 3986 doesn't allow non-ASCII characters,
and url-generic-parse-url doesn't do anything about that, it is either
already broken for non-ASCII characters, or already copes with them.
So we don't need to worry about that.
However, a safer change would be to do something like this:
(or (not (multibyte-string-p url-http-target-url))
(setq url-http-target-url
(decode-coding-string url-http-target-url 'utf-8)))
in url-http-create-request. Can you try this?
Thanks.
This bug report was last modified 8 years and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.