summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2018-04-24 14:09:41 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2018-04-24 14:09:53 +0200
commitca5713deffde3e4b3126e60e75c169af824365ec (patch)
tree1b4239cf9bd7f043347268b707ed4540b9d5b3b6 /lisp
parentfa3136e07148ab37fabc52007f531e71e41a1d5a (diff)
downloademacs-ca5713deffde3e4b3126e60e75c169af824365ec.tar.gz
emacs-ca5713deffde3e4b3126e60e75c169af824365ec.tar.bz2
emacs-ca5713deffde3e4b3126e60e75c169af824365ec.zip
Make url-http-create-request work with non-ASCII data again
* lisp/url/url-http.el (url-http-create-request): Ensure that the entire request string is unibyte (bug#31248).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/url/url-http.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index d45bb323b12..0b95453b300 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -306,7 +306,7 @@ as the Referer-header (subject to `url-privacy-level'."
(and (boundp 'proxy-info)
proxy-info)
url-http-target-url) nil 'any nil)))
- (ref-url url-http-referer))
+ (ref-url (url-http--encode-string url-http-referer)))
(if (equal "" real-fname)
(setq real-fname "/"))
(setq no-cache (and no-cache (string-match "no-cache" no-cache)))
@@ -355,9 +355,11 @@ as the Referer-header (subject to `url-privacy-level'."
(url-scheme-get-property
(url-type url-http-target-url) 'default-port))
(format
- "Host: %s:%d\r\n" (puny-encode-domain host)
+ "Host: %s:%d\r\n" (url-http--encode-string
+ (puny-encode-domain host))
(url-port url-http-target-url))
- (format "Host: %s\r\n" (puny-encode-domain host)))
+ (format "Host: %s\r\n"
+ (url-http--encode-string (puny-encode-domain host))))
;; Who its from
(if url-personal-mail-address
(concat