summaryrefslogtreecommitdiff
path: root/lisp/url/url-http.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-04-16 17:02:01 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-16 17:02:01 +0200
commit37b11e5f169f03cc5c8ee63b797b848dabd8f0e8 (patch)
tree7f7ad6127c6e15085f4313258d51e90165fc3f24 /lisp/url/url-http.el
parent51013d328c36668410e03d55060059576e286a98 (diff)
downloademacs-37b11e5f169f03cc5c8ee63b797b848dabd8f0e8.tar.gz
emacs-37b11e5f169f03cc5c8ee63b797b848dabd8f0e8.tar.bz2
emacs-37b11e5f169f03cc5c8ee63b797b848dabd8f0e8.zip
Further IDNA/proxy url fixes
* lisp/url/url-http.el (url-http-create-request): Puny-encode domains (bug#54921).
Diffstat (limited to 'lisp/url/url-http.el')
-rw-r--r--lisp/url/url-http.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 96a47429569..b5bcd123c73 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -332,7 +332,10 @@ Use `url-http-referer' as the Referer-header (subject to `url-privacy-level')."
(if (and using-proxy
;; Bug#35969.
(not (equal "https" (url-type url-http-target-url))))
- (url-recreate-url url-http-target-url) real-fname))
+ (let ((url (copy-sequence url-http-target-url)))
+ (setf (url-host url) (puny-encode-domain (url-host url)))
+ (url-recreate-url url))
+ real-fname))
" HTTP/" url-http-version "\r\n"
;; Version of MIME we speak
"MIME-Version: 1.0\r\n"