From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#23750: 25.0.95; bug in url-retrieve or json.el Date: Mon, 20 Jun 2016 08:15:26 +0800 Message-ID: References: <358304f6-98e1-fa10-8805-aa9b73db406a@yandex.ru> <83k2hl828z.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466381788 28670 80.91.229.3 (20 Jun 2016 00:16:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 00:16:28 +0000 (UTC) To: 23750@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 02:16:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bEmsv-00006w-5N for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 02:16:13 +0200 Original-Received: from localhost ([::1]:40531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmsu-00010q-B1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Jun 2016 20:16:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmso-00010h-H7 for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:16:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEmsk-0002gI-Ap for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:16:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmsk-0002gE-7W for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bEmsk-0001L5-4H for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:16:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 00:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14663817585138 (code B ref -1); Mon, 20 Jun 2016 00:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jun 2016 00:15:58 +0000 Original-Received: from localhost ([127.0.0.1]:46813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEmsg-0001Ko-Is for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:15:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEmse-0001Ka-2T for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:15:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEmsY-0002eP-38 for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:15:50 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmsY-0002eL-09 for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:15:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmsW-00010Q-0K for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:15:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEmsR-0002db-Pm for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:15:46 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEmsR-0002dJ-I5 for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:15:43 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bEmsO-00085j-F2 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 02:15:40 +0200 Original-Received: from 221.222.148.172 ([221.222.148.172]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Jun 2016 02:15:40 +0200 Original-Received: from sdl.web by 221.222.148.172 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Jun 2016 02:15:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 221.222.148.172 Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (OS X 10.11.5) Cancel-Lock: sha1:4XeCojulaRVlYuy6Dv8iPZa1p1Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:119802 Archived-At: On 2016-06-19 21:36 +0300, Dmitry Gutov wrote: > This particular bug came from this: > > "Content-length: " (number-to-string (length url-http-data)) > > Which gives wrong value when url-http-data is multibyte (it should be > length in bytes). So then, the HTTP server on the other side saw the > wrong body length and truncated the body when reading the request. As Dmitry mentioned earlier json-encode in 25.1 produces multibyte strings and makes it easier to hit this bug when consuming JSON API's. There are three parties that are suspicious: 1) JSON API server 2) JSON.el 3) URL. It took me a while to realise it's URL's fault IOW the bug isn't easy to debug. This is somewhat related to changes brought in by 25.1. Leo