mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-14 09:39:42 +00:00
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).
This commit is contained in:
parent
ea5d141882
commit
2ede29575f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user