Subject: Re: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request

From: Dmitry Gutov <[email-masked]>
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?