unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: 23750@debbugs.gnu.org
Subject: bug#23750: 25.0.95; bug in url-retrieve or json.el
Date: Mon, 20 Jun 2016 08:15:26 +0800	[thread overview]
Message-ID: <m1eg7sd8bl.fsf@zeuss-MBP.lan> (raw)
In-Reply-To: <m137oj5eoi.fsf@gmail.com>

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






  reply	other threads:[~2016-06-20  0:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12  2:22 bug#23750: 25.0.95; bug in url-retrieve or json.el Leo Liu
2016-06-13 15:02 ` Dmitry Gutov
2016-06-13 17:55   ` Stefan Monnier
2016-06-13 19:26     ` Dmitry Gutov
2016-06-14  0:30       ` Stefan Monnier
2016-06-19 18:14         ` Dmitry Gutov
2016-06-19 18:25           ` Eli Zaretskii
2016-06-19 18:30             ` John Wiegley
2016-06-19 18:45               ` Dmitry Gutov
2016-06-19 19:56                 ` John Wiegley
2016-06-19 20:05                   ` Dmitry Gutov
2016-06-19 21:07                     ` John Wiegley
2016-06-20  1:28                       ` Glenn Morris
2016-06-20  4:22                         ` John Wiegley
2016-06-20 12:39                           ` Lars Ingebrigtsen
2016-07-01 20:49                             ` John Wiegley
2016-06-20 14:42                           ` Eli Zaretskii
2016-06-23 17:14                           ` Glenn Morris
2016-06-20  1:26                   ` Glenn Morris
2016-06-20  2:58                   ` Dmitry Gutov
2016-06-19 18:36             ` Dmitry Gutov
2016-06-20  0:15               ` Leo Liu [this message]
2016-06-20 14:39                 ` Eli Zaretskii
2016-06-20  2:40               ` Eli Zaretskii
2016-06-20  2:51                 ` Dmitry Gutov
2016-06-20 14:38                   ` Eli Zaretskii
2016-06-20 14:54                     ` Dmitry Gutov
2016-06-20 15:03                       ` Eli Zaretskii
2016-06-20 17:16                     ` Dmitry Gutov
2016-06-20 20:17                       ` Eli Zaretskii
2016-06-20 20:27                         ` Dmitry Gutov
2016-06-21  2:30                           ` Eli Zaretskii
2016-06-21 13:51                             ` Dmitry Gutov
2016-06-21 15:18                               ` Eli Zaretskii
2016-06-22  1:08                                 ` John Wiegley
2016-06-22  2:36                                   ` Eli Zaretskii
2016-06-22 18:21                                   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1eg7sd8bl.fsf@zeuss-MBP.lan \
    --to=sdl.web@gmail.com \
    --cc=23750@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).