From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: bug#23750: 25.0.95; bug in url-retrieve or json.el Date: Sat, 03 Dec 2016 01:37:19 +0100 Message-ID: References: <6d0c8c2e-8428-2fdb-0d6e-899f7b9d7ffd@nifty.com> <86ccb4af-5719-c017-26bb-fc06b4c904d2@yandex.ru> <83r35uxkr5.fsf@gnu.org> <4e12d4ad-cd6b-3087-5d7c-449d4c1886e2@yandex.ru> <83lgw1q9uu.fsf@gnu.org> <83eg1tq8is.fsf@gnu.org> <787e5206-53e0-752f-a339-4608d2f7ad39@yandex.ru> <837f7lq6lg.fsf@gnu.org> <83bmwvpo0o.fsf@gnu.org> <04e2da4e-1fa3-4483-459c-32f272378486@yandex.ru> <8508920e-097f-0b2a-0558-49973ea0def6@yandex.ru> <765199a5-1ca1-da30-9414-93b40f9406d6@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1480725489 18180 195.159.176.226 (3 Dec 2016 00:38:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Dec 2016 00:38:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: p.stephani2@gmail.com, emacs-devel@gnu.org, Eli Zaretskii , kentaro.nakazawa@nifty.com To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 03 01:38:03 2016 Return-path: Envelope-to: ged-emacs-devel@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 1cCyL4-0003lX-4S for ged-emacs-devel@m.gmane.org; Sat, 03 Dec 2016 01:38:02 +0100 Original-Received: from localhost ([::1]:37176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCyL8-0001d7-0N for ged-emacs-devel@m.gmane.org; Fri, 02 Dec 2016 19:38:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCyKY-0001cr-8g for emacs-devel@gnu.org; Fri, 02 Dec 2016 19:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCyKV-0001yl-4Y for emacs-devel@gnu.org; Fri, 02 Dec 2016 19:37:30 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:56683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCyKU-0001yS-Td; Fri, 02 Dec 2016 19:37:27 -0500 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 1cCyKN-00056G-LC; Sat, 03 Dec 2016 01:37:21 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEX930/++l3cZAeJIAFa CgChMQL3ujjFSQSxOgPwhBL/9SDnAAACPElEQVQ4jWWUPW/bMBCGqcWAN3ExOjocJGimhDprJSPp GpWIuskFKoCrgJbK6oIQvQUe5PLf9u70Ybs5SMv78D7IO5JJKTOllKucc70xAs2fjWego+acmVTh EwK5VFU/6ubXZ5F4shhAWVWuJ920s05AjcFHIESS3AJjXPetKIpS6GYYvJ4BrgY5S6U4D9rDdxkB RIK/9SYRvmkGrf15CdVNOShD0wCAanE1Kk1TM8bRNIBSvZEQ8BtrCPxG/R6ghwIAOuP3YEBQfwBr 9HBXENaBPnwEIddtcmmCCVgXsQn8iJ2z3xfQbwkEPLxYbFk9gawfPRhbdwra2Z8QwFmpPsIcK61j p2QuswiC+kvCMhPhPuDcOifRtjz8+UigN2IYziK26FAUj+u0+EogzWFIYmNsKdMcuvK3GEGXFlLu Sxgi+Qd0MgR7kxZ5msu8VNIWC3AEyHaQ4wrsBOYYM4hbBDmVmUpVYlXo9gXAM4KKxsoZh5UReGM7 AFnVtzS2sbG3ANzVKxCDHlTKAsAHQvVwWPIewBbhhlSg51TfEySfAWxcKSiNqnqKj1OoAkGGfapU V7mWPDq6BWIyuh7n+ARgtFsdQPsf8DM4Qs9Jj0lPFgChWj/b0ExWNxrAOzR/nOhlTFm4OrFsuwoZ zNImPIQH/sD5p/BBcwD7aLV5HxjfcAQBTipeEEgeBcE808u0h6sjy0+Qc0x+LVjELywfb/N162Nj XvAtQassTPpuWmTLZ8/gBAHR+2PpFFp6Ofw/D4xcOKC5VIQAAAAASUVORK5CYII= In-Reply-To: <765199a5-1ca1-da30-9414-93b40f9406d6@yandex.ru> (Dmitry Gutov's message of "Sat, 3 Dec 2016 01:13:33 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209962 Archived-At: Dmitry Gutov writes: > If we make the proposed change, this function will violate the > contract on url-request-data (if the described above is its main use > case). > > Luckily, this function is part of Emacs, so we can fix it in the same patch. I'm sorry, I'm not sure how to respond to this without making accusations of a bad faith response on your part. This is a function will an ill-defined interface, but virtually all callers here understand what the interface is ("don't put anything into the body that isn't ASCII"). Even if wonkily defined, this works for virtually all callers, in-tree or not. You're proposing a change that would make virtually all these usages of this (ill-defined) function fail. The real fix for this extremely obscure problem is 1) to remove the `error' call you introduced in Emacs 25.1, and 2) make the Content-Length header reflect the number of octets transferred instead of the number of bytes in the URL string. This would have moved the number of successful calls to `url-retrieve' from (I'm guesstimating) 99.9995% to 99.999995%, and people who wanted to send iso8859-1 text to web servers would still fail. But these people are pretty rare. Your proposal would move the number of successful calls to `url-retrieve' with a body to around 0%. At this point I'm not sure what else to say. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no