|
From: | Dmitry Gutov |
Subject: | bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request |
Date: | Thu, 11 Aug 2016 17:59:16 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 |
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?
[Prev in Thread] | Current Thread | [Next in Thread] |