diff options
| author | Paul Eggert | 2016-06-26 00:16:25 +0200 |
|---|---|---|
| committer | Paul Eggert | 2016-06-26 00:16:25 +0200 |
| commit | fdcf46d33eebc59e56a35fcea186c61aad3c81d0 (patch) | |
| tree | 8db131d7f52ead80ee12e52c3236510f71b31b48 /lisp/url | |
| parent | d6930356cabd3036e445cc6a2f668b1fd3e0cde4 (diff) | |
| parent | 0377fe2b819bb93ac7dc314c8dbd99304d8b98d0 (diff) | |
| download | emacs-fdcf46d33eebc59e56a35fcea186c61aad3c81d0.tar.gz emacs-fdcf46d33eebc59e56a35fcea186c61aad3c81d0.zip | |
Merge from origin/emacs-25
0377fe2 ; Spelling fixes
f253695 Update docs for `customize-mode'
4395aaa Fix documentation of 'assoc-string' and 'compare-strings'
ab0ebb9 ; Only load .elc file in tests.
a98aa02 Error on multibyte characters in HTTP request
ea512a7 * lisp/gnus/mm-decode.el (mm-convert-shr-links): Mask keys th...
8297331 ; Revert "Ensure undo-boundary after insert-file-contents."
dc5e65b Unset GIT_DIR when calling Git commands
6cdd8f7 Ensure undo-boundary after insert-file-contents.
4793f5f Clarify documentation of 'line-spacing' and 'line-height'
5f37572 Fix removal of variables from process-environment
e5e886d * admin/authors.el (authors-ignored-files, authors-valid-file...
db0777b * admin/authors.el (authors-aliases, authors-fixed-case): Add...
# Conflicts:
# doc/lispref/modes.texi
# lisp/gnus/mm-decode.el
Diffstat (limited to 'lisp/url')
| -rw-r--r-- | lisp/url/url-http.el | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 306b36ae951..ef7b77969e6 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -307,19 +307,7 @@ The string is based on `url-privacy-level' and `url-user-agent'." | |||
| 307 | ;; allows us to elide null lines directly, at the cost of making | 307 | ;; allows us to elide null lines directly, at the cost of making |
| 308 | ;; the layout less clear. | 308 | ;; the layout less clear. |
| 309 | (setq request | 309 | (setq request |
| 310 | ;; We used to concat directly, but if one of the strings happens | 310 | (concat |
| 311 | ;; to being multibyte (even if it only contains pure ASCII) then | ||
| 312 | ;; every string gets converted with `string-MAKE-multibyte' which | ||
| 313 | ;; turns the 127-255 codes into things like latin-1 accented chars | ||
| 314 | ;; (it would work right if it used `string-TO-multibyte' instead). | ||
| 315 | ;; So to avoid the problem we force every string to be unibyte. | ||
| 316 | (mapconcat | ||
| 317 | ;; FIXME: Instead of `string-AS-unibyte' we'd want | ||
| 318 | ;; `string-to-unibyte', so as to properly signal an error if one | ||
| 319 | ;; of the strings contains a multibyte char. | ||
| 320 | 'string-as-unibyte | ||
| 321 | (delq nil | ||
| 322 | (list | ||
| 323 | ;; The request | 311 | ;; The request |
| 324 | (or url-http-method "GET") " " | 312 | (or url-http-method "GET") " " |
| 325 | (if using-proxy (url-recreate-url url-http-target-url) real-fname) | 313 | (if using-proxy (url-recreate-url url-http-target-url) real-fname) |
| @@ -398,7 +386,10 @@ The string is based on `url-privacy-level' and `url-user-agent'." | |||
| 398 | "\r\n" | 386 | "\r\n" |
| 399 | ;; Any data | 387 | ;; Any data |
| 400 | url-http-data)) | 388 | url-http-data)) |
| 401 | "")) | 389 | ;; Bug#23750 |
| 390 | (unless (= (string-bytes request) | ||
| 391 | (length request)) | ||
| 392 | (error "Multibyte text in HTTP request: %s" request)) | ||
| 402 | (url-http-debug "Request is: \n%s" request) | 393 | (url-http-debug "Request is: \n%s" request) |
| 403 | request)) | 394 | request)) |
| 404 | 395 | ||