diff options
| author | Lars Ingebrigtsen | 2018-04-24 14:09:41 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-04-24 14:09:53 +0200 |
| commit | ca5713deffde3e4b3126e60e75c169af824365ec (patch) | |
| tree | 1b4239cf9bd7f043347268b707ed4540b9d5b3b6 | |
| parent | fa3136e07148ab37fabc52007f531e71e41a1d5a (diff) | |
| download | emacs-ca5713deffde3e4b3126e60e75c169af824365ec.tar.gz 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).
| -rw-r--r-- | lisp/url/url-http.el | 8 |
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'." | |||
| 306 | (and (boundp 'proxy-info) | 306 | (and (boundp 'proxy-info) |
| 307 | proxy-info) | 307 | proxy-info) |
| 308 | url-http-target-url) nil 'any nil))) | 308 | url-http-target-url) nil 'any nil))) |
| 309 | (ref-url url-http-referer)) | 309 | (ref-url (url-http--encode-string url-http-referer))) |
| 310 | (if (equal "" real-fname) | 310 | (if (equal "" real-fname) |
| 311 | (setq real-fname "/")) | 311 | (setq real-fname "/")) |
| 312 | (setq no-cache (and no-cache (string-match "no-cache" no-cache))) | 312 | (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'." | |||
| 355 | (url-scheme-get-property | 355 | (url-scheme-get-property |
| 356 | (url-type url-http-target-url) 'default-port)) | 356 | (url-type url-http-target-url) 'default-port)) |
| 357 | (format | 357 | (format |
| 358 | "Host: %s:%d\r\n" (puny-encode-domain host) | 358 | "Host: %s:%d\r\n" (url-http--encode-string |
| 359 | (puny-encode-domain host)) | ||
| 359 | (url-port url-http-target-url)) | 360 | (url-port url-http-target-url)) |
| 360 | (format "Host: %s\r\n" (puny-encode-domain host))) | 361 | (format "Host: %s\r\n" |
| 362 | (url-http--encode-string (puny-encode-domain host)))) | ||
| 361 | ;; Who its from | 363 | ;; Who its from |
| 362 | (if url-personal-mail-address | 364 | (if url-personal-mail-address |
| 363 | (concat | 365 | (concat |