emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 7878794 187/495: send the correct content-length t


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 7878794 187/495: send the correct content-length to the playground
Date: Sat, 7 Aug 2021 09:05:10 -0400 (EDT)

branch: elpa/go-mode
commit 787879404cc88c7bf0204d594b811cbe039a02a0
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    send the correct content-length to the playground
    
    The url package uses (length) to determine the content length. For
    multibyte sequences, that returns an incorrect result unless we
    explicitly hand individual bytes to it.
---
 go-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index 545f789..9f67375 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -785,7 +785,10 @@ link in the kill ring."
   (let* ((url-request-method "POST")
          (url-request-extra-headers
           '(("Content-Type" . "application/x-www-form-urlencoded")))
-         (url-request-data (buffer-substring-no-properties start end))
+         (url-request-data
+          (encode-coding-string
+           (buffer-substring-no-properties start end)
+           'utf-8))
          (content-buf (url-retrieve
                        "http://play.golang.org/share";
                        (lambda (arg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]