From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request Date: Tue, 09 Aug 2016 11:39:20 +0200 Message-ID: References: <83d1ltq3p6.fsf@gnu.org> <83popsocg8.fsf@gnu.org> <7fb3540a-7b74-68cf-2c63-66474de26640@yandex.ru> <83mvkvmbv2.fsf@gnu.org> <27168f12-32d2-cb38-45c0-27d3339c75aa@yandex.ru> <83twf0lb5s.fsf@gnu.org> <30c5515e-57e3-9f6f-6c7e-8171e9300aeb@yandex.ru> <6da984b9-0c9c-e685-75b8-d21468068148@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470735681 4364 195.159.176.226 (9 Aug 2016 09:41:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2016 09:41:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: stakemorii@gmail.com, 24117@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 09 11:41:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX3XA-000103-7k for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Aug 2016 11:41:16 +0200 Original-Received: from localhost ([::1]:34469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX3X7-0005T5-3f for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Aug 2016 05:41:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX3X0-0005Sz-2u for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 05:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX3Ww-0006uL-RX for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 05:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX3Ww-0006uG-Np for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 05:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bX3Ww-0003iX-Dq for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 05:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Aug 2016 09:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24117-submit@debbugs.gnu.org id=B24117.147073560514215 (code B ref 24117); Tue, 09 Aug 2016 09:41:02 +0000 Original-Received: (at 24117) by debbugs.gnu.org; 9 Aug 2016 09:40:05 +0000 Original-Received: from localhost ([127.0.0.1]:60683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX3W0-0003hD-MY for submit@debbugs.gnu.org; Tue, 09 Aug 2016 05:40:04 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:50260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX3Vy-0003gi-82 for 24117@debbugs.gnu.org; Tue, 09 Aug 2016 05:40:02 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bX3Vt-0000yI-MA; Tue, 09 Aug 2016 11:39:59 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVHQUFlXlwSEBGxqaUr KCg5NTWwNAYgAAACeElEQVQ4jX2TQY8zJwyGTRbuuIT7Lp29h2/UOxnZd0+K//9f6custlpVbYkS gR/br20I7f++Ov0H2P8H9H9YyjfgH6byt30nLj+8895L/6HRv2F97n1lACRsGOsL/Pq976VchErp 3LlwWWHs5bF3+BcmBgXBwnnbrkDYmArSwGelLv0Ya3O5EXPgVcmVuX3sOCx7Jqacv7V3fuv7Y4GS KTslxJSl1P25kpa9B6ZHSiWgxrwqOD7wG8qeuVJG9BtaQdPc2ztDDMXnSumEcWXtjz23917K0h6R ql2lgeUO8CgcQmCDsobsjAISAXGGLJ1MB9Fgd8I6mifmFEIyIjnIkCR6rtzau3N2M1c1AGjXRBA6 2gaQzKLoHAeFO4DRn73qKVz9dBVPiHirqK+juSrW3qOIi0xXRFCngFpQyGiNEir0OcfEroeQMcxw vKCf4EmUKBIpO+oL1Y5ba58JZgx8AWJL1+doWLDiLtwnUrCR4zwvkC1TkrmhD1zUajzJ64rwCPMm rwUSeUguc4GUECmCPhCQ58hThWD/iNI2uAAkkCmGxvICN8XO1V4AIag+ZQt3ALRuajrniiBWyyK3 XwskhZgsEENksbjp/GOlwjBUFCq4KAqGwWmMrb0WgP1+NDI7TUaU+5I4PkZS+fTVkOmoI6xp4zSf Rojwhs7pnJPyOEfcWrNsJKrS0DlCpmZJ21ggOKnPly7gShjyow30fMqzqqMOj4R55yokc4i08TrZ YQh8ww0q1Vw/Ua9tesMd8/pGinhuyeYnhFTsN+KvdafheC2pYbj5Jekevv5P4U4q26ZySApVNNVw +VPpJO3AhTUZlqNebx92gL8AeVOzm8XarqMAAAAASUVORK5CYII= In-Reply-To: (Dmitry Gutov's message of "Tue, 9 Aug 2016 05:13:04 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122001 Archived-At: Dmitry Gutov writes: > Here's another question: why does url-encode-url pass the argument > through encode-coding-string before passing it to > url-generic-parse-url, if the latter is expected to be able to deal > with non-ASCII characters? I don't know. I don't think `url-encode-url' has ever really worked in any sensible way in the presence of non-ASCII. > The only recent change in that function is your commit 8b61c22e dated > last December, which very much looks like a band-aid in this context. It's debatable what that function should return in the presence of non-ASCII domain names, but it's a debatable function all around. > Since you're better versed in this area than me, can you propose a > specific fix for the currently discussed bug? It is more serious than > not being able to use unicode in URLs. I didn't understand the original bug report and there was no simple recipe to reproduce the bug. Why changing url-generic-parse-url was proposed as a solution is even less unclear. Perhaps you could write a test case and summarise what you think the problem is? > On master, the domain part, which is untouched by url-encode-url, is > converted to an ASCII unibyte string with puny-encode-domain, inside > url-http-create-request. But real-fname remains a multibyte string, > triggering the problem anyway. The domain is encoded according to IDNA, which is an ASCII string, yes. (Whether the function returns a unibyte string or not I can't recall.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no