aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/url/url-http.el6
-rw-r--r--lisp/url/url-util.el2
2 files changed, 5 insertions, 3 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 916f263e4fe..258f8025662 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -26,6 +26,7 @@
26;;; Code: 26;;; Code:
27 27
28(require 'cl-lib) 28(require 'cl-lib)
29(require 'puny)
29(eval-when-compile 30(eval-when-compile
30 (require 'subr-x)) 31 (require 'subr-x))
31 32
@@ -318,8 +319,9 @@ request.")
318 (url-scheme-get-property 319 (url-scheme-get-property
319 (url-type url-http-target-url) 'default-port)) 320 (url-type url-http-target-url) 'default-port))
320 (format 321 (format
321 "Host: %s:%d\r\n" host (url-port url-http-target-url)) 322 "Host: %s:%d\r\n" (puny-encode-domain host)
322 (format "Host: %s\r\n" host)) 323 (url-port url-http-target-url))
324 (format "Host: %s\r\n" (puny-encode-domain host)))
323 ;; Who its from 325 ;; Who its from
324 (if url-personal-mail-address 326 (if url-personal-mail-address
325 (concat 327 (concat
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index e011b96ada2..54b02e98c97 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -468,7 +468,7 @@ should return it unchanged."
468 (and host 468 (and host
469 (not (string-match "\\`\\[.*\\]\\'" host)) 469 (not (string-match "\\`\\[.*\\]\\'" host))
470 (setf (url-host obj) 470 (setf (url-host obj)
471 (url-hexify-string host url-host-allowed-chars))) 471 (decode-coding-string (url-host obj) 'utf-8)))
472 472
473 (if path 473 (if path
474 (setq path (url-hexify-string path url-path-allowed-chars))) 474 (setq path (url-hexify-string path url-path-allowed-chars)))