GNU bug report logs - #24117
25.1; url-http-create-request: Multibyte text in HTTP request

Previous Next

Package: emacs;

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: stakemorii <at> gmail.com, larsi <at> gnus.org, schwab <at> linux-m68k.org, 24117 <at> debbugs.gnu.org
Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request
Date: Thu, 11 Aug 2016 17:59:16 +0300
On 08/11/2016 05:47 PM, Eli Zaretskii wrote:

> But AFAIU it doesn't have to be ASCII, it could include non-ASCII
> characters, no?

Not the values we pass to url-http--encode-string in this patch, no. As 
you said, when the request hits the wire, it has to be unibyte.

When the strings reach url-http-create-request, they either contain no 
multibyte characters, or url-http-create-request has to convert the 
strings in some meaningful fashion, and url-http--encode-string is not that.

In master, it uses puny-encode-domain. We can safely assume that 
internationalized domain names don't work in emacs-25.

>> As a bonus, using us-ascii will validate that the strings indeed do
>> not contain any unexpected characters.
>
> If we did allow non-ASCII characters until now, we will definitely
> hear from someone who'd say this is a regression.

I find that highly unlikely. HTTP URLs with multibyte characters need to 
be encoded in a specific way.

> LGTM, modulo the considerations about the encoding.

Thanks. Can we designate this bug as a blocker?




This bug report was last modified 8 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.