summaryrefslogtreecommitdiff
path: root/lisp/url/url-http.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-06-19 21:06:39 +0300
committerDmitry Gutov <dgutov@yandex.ru>2016-06-19 21:06:39 +0300
commit2ede29575fa22eb7c265117d7511cff9fe02c606 (patch)
treed94291b1dceaf40b97a4850e751caaff5979a22e /lisp/url/url-http.el
parentea5d141882b5b0519abc8f50f28a43b9ae41c50d (diff)
downloademacs-2ede29575fa22eb7c265117d7511cff9fe02c606.tar.gz
Prohibit multibyte characters in url-http-data
It didn't work anyway, but this makes any such errors more obvious by catching them earlier. * lisp/url/url-http.el (url-http-create-request): Use string-to-unibyte (bug#23750).
Diffstat (limited to 'lisp/url/url-http.el')
-rw-r--r--lisp/url/url-http.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 306b36ae951..0e6f5d3694b 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -310,14 +310,10 @@ The string is based on `url-privacy-level' and `url-user-agent'."
;; We used to concat directly, but if one of the strings happens
;; to being multibyte (even if it only contains pure ASCII) then
;; every string gets converted with `string-MAKE-multibyte' which
- ;; turns the 127-255 codes into things like latin-1 accented chars
- ;; (it would work right if it used `string-TO-multibyte' instead).
+ ;; turns the 127-255 codes into things like latin-1 accented chars.
;; So to avoid the problem we force every string to be unibyte.
(mapconcat
- ;; FIXME: Instead of `string-AS-unibyte' we'd want
- ;; `string-to-unibyte', so as to properly signal an error if one
- ;; of the strings contains a multibyte char.
- 'string-as-unibyte
+ 'string-to-unibyte
(delq nil
(list
;; The request