all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23750: 25.0.95; bug in url-retrieve or json.el
@ 2016-06-12  2:22 Leo Liu
  2016-06-13 15:02 ` Dmitry Gutov
  0 siblings, 1 reply; 125+ messages in thread
From: Leo Liu @ 2016-06-12  2:22 UTC (permalink / raw)
  To: 23750


I have been trying to debug an issue in TernJs¹ on and off for a few
months now and it seems the cause is some nasty bug in Emacs 25. Could
someone follow the steps detailed in
https://github.com/ternjs/tern/issues/719 to reproduce the issue?

I have verified that the bug is not in Tern but Emacs i.e. under some
circumstances emacs's URL package strips some chars in the request body
which, in this case, leads to unbalanced parentheses in the JSON doc.

Leo

Footnotes: 
¹  https://github.com/ternjs/tern/issues/719





^ permalink raw reply	[flat|nested] 125+ messages in thread
* bug#23750: 25.0.95; bug in url-retrieve or json.el
@ 2016-11-29  8:22 Kentaro NAKAZAWA
  2016-11-29  9:54 ` Andreas Schwab
  0 siblings, 1 reply; 125+ messages in thread
From: Kentaro NAKAZAWA @ 2016-11-29  8:22 UTC (permalink / raw)
  To: dgutov, emacs-devel

Why can not I use multibyte text for http requests?
The following correct http request will fail.

(require 'json)
(let* ((content "ほげ <- VALID utf-8 Japanese multibyte text")
       (url "https://api.github.com/gists")
       (url-request-method "POST")
       (url-request-data
        (json-encode
         `(("description" . "test")
           ("public" . false)
           ("files" . (("test.txt" . (("content" . ,content)))))))))
  (with-current-buffer (url-retrieve-synchronously url)
    (buffer-string)))
=> url-http-create-request: Multibyte text in HTTP request: POST /gists
HTTP/1.1

Please apply the following patch.

--- url-http.el.orig	2016-09-15 17:16:04.000000000 +0900
+++ url-http.el	2016-11-29 17:10:57.018703500 +0900
@@ -351,16 +351,12 @@
              (if url-http-data
                  (concat
                   "Content-length: " (number-to-string
-                                      (length url-http-data))
+                                      (string-bytes url-http-data))
                   "\r\n"))
              ;; End request
              "\r\n"
              ;; Any data
              url-http-data))
-    ;; Bug#23750
-    (unless (= (string-bytes request)
-               (length request))
-      (error "Multibyte text in HTTP request: %s" request))
     (url-http-debug "Request is: \n%s" request)
     request))



^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2017-01-28 14:16 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
  -- strict thread matches above, loose matches on Subject: below --
2016-11-29  8:22 Kentaro NAKAZAWA
2016-11-29  9:54 ` Andreas Schwab
2016-11-29 10:06   ` Kentaro NAKAZAWA
2016-11-29 10:08     ` Dmitry Gutov
2016-11-29 10:23       ` Kentaro NAKAZAWA
2016-11-29 10:34         ` Lars Ingebrigtsen
2016-11-29 10:38           ` Kentaro NAKAZAWA
2016-11-29 10:42             ` Lars Ingebrigtsen
2016-11-29 10:48               ` Kentaro NAKAZAWA
2016-11-29 10:49               ` Dmitry Gutov
2016-11-29 10:50             ` Dmitry Gutov
2016-11-29 10:55               ` Kentaro NAKAZAWA
2016-11-29 10:59                 ` Dmitry Gutov
2016-11-29 11:03                   ` Kentaro NAKAZAWA
2016-11-29 11:05                     ` Dmitry Gutov
2016-11-29 11:12                       ` Kentaro NAKAZAWA
2016-11-29 17:23                       ` Eli Zaretskii
2016-11-29 23:09                         ` Philipp Stephani
2016-11-29 23:18                           ` Philipp Stephani
2016-11-30 15:11                             ` Eli Zaretskii
2016-11-30 15:20                               ` Lars Ingebrigtsen
2016-11-30 15:43                                 ` Eli Zaretskii
2016-11-30 15:46                                   ` Lars Ingebrigtsen
2016-11-30  0:16                           ` Dmitry Gutov
2016-11-30 15:13                             ` Eli Zaretskii
2016-11-30 15:17                               ` Dmitry Gutov
2016-11-30 15:32                                 ` Stefan Monnier
2016-11-30 15:42                                 ` Eli Zaretskii
2016-11-30 15:45                                   ` Dmitry Gutov
2016-11-30 15:48                                     ` Lars Ingebrigtsen
2016-11-30 16:25                                       ` Eli Zaretskii
2016-11-30 16:27                                         ` Lars Ingebrigtsen
2016-11-30 16:42                                           ` Eli Zaretskii
2016-11-30 18:25                                             ` Philipp Stephani
2016-11-30 18:48                                               ` Eli Zaretskii
2016-12-28 18:18                                                 ` Philipp Stephani
2016-12-28 18:34                                                   ` Eli Zaretskii
2016-12-28 18:45                                                     ` Philipp Stephani
2016-12-28 18:55                                                       ` Eli Zaretskii
2016-12-28 19:03                                                       ` Andreas Schwab
2016-11-30 18:23                                         ` Philipp Stephani
2016-11-30 18:44                                           ` Eli Zaretskii
2016-12-28 18:09                                             ` Philipp Stephani
2016-12-28 18:27                                               ` Eli Zaretskii
2016-12-28 18:35                                                 ` Philipp Stephani
2016-12-28 18:45                                                   ` Eli Zaretskii
2016-12-28 18:22                                       ` Philipp Stephani
2016-12-28 18:57                                         ` Lars Ingebrigtsen
2016-12-30  0:07                                           ` Richard Stallman
2016-12-30 14:15                                             ` Lars Ingebrigtsen
2016-12-30 16:59                                               ` Eli Zaretskii
2017-01-21 15:39                                                 ` Lars Ingebrigtsen
2017-01-21 15:56                                                   ` Eli Zaretskii
2017-01-21 16:30                                                     ` Lars Ingebrigtsen
2017-01-21 22:58                                                       ` Stefan Monnier
2017-01-24 20:04                                                         ` Lars Ingebrigtsen
2017-01-28  9:52                                                           ` Elias Mårtenson
2017-01-28 14:16                                                             ` Lars Ingebrigtsen
2016-12-30 21:38                                               ` Richard Stallman
2016-11-30 16:23                                     ` Eli Zaretskii
2016-12-01  0:30                                       ` Dmitry Gutov
2016-12-01 17:17                                         ` Eli Zaretskii
2016-12-02 13:18                                           ` Dmitry Gutov
2016-12-02 14:24                                             ` Eli Zaretskii
2016-12-02 14:35                                               ` Dmitry Gutov
2016-12-02 15:20                                                 ` Eli Zaretskii
2016-12-02 14:53                                               ` Yuri Khan
2016-12-02 15:45                                                 ` Eli Zaretskii
2016-12-02 15:51                                                 ` Lars Ingebrigtsen
2016-12-02 15:58                                                   ` Eli Zaretskii
2016-12-02 15:29                                             ` Lars Ingebrigtsen
2016-12-02 15:32                                               ` Dmitry Gutov
2016-12-02 15:48                                                 ` Lars Ingebrigtsen
2016-12-02 15:56                                                   ` Dmitry Gutov
2016-12-02 16:02                                                     ` Lars Ingebrigtsen
2016-12-02 16:06                                                       ` Dmitry Gutov
2016-12-02 16:31                                                         ` Lars Ingebrigtsen
2016-12-02 23:13                                                           ` Dmitry Gutov
2016-12-03  0:37                                                             ` Lars Ingebrigtsen
2016-12-03  1:27                                                               ` Dmitry Gutov
2016-12-03  8:12                                                               ` Eli Zaretskii
2016-12-03 10:01                                                                 ` Lars Ingebrigtsen
2016-12-03 16:00                                                                   ` Stefan Monnier
2016-12-03 20:01                                                                     ` Lars Ingebrigtsen
2016-12-03 20:57                                                                       ` Andreas Schwab
2016-12-28 18:25                                         ` Philipp Stephani
2016-11-30 15:06                           ` Eli Zaretskii
2016-11-30 15:31                             ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.