]> git.eshelyaron.com Git - emacs.git/commitdiff
Further IDNA/proxy url fixes
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 16 Apr 2022 15:02:01 +0000 (17:02 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 16 Apr 2022 15:02:01 +0000 (17:02 +0200)
* lisp/url/url-http.el (url-http-create-request): Puny-encode
domains (bug#54921).

lisp/url/url-http.el

index 96a47429569f14b5a4480bff899150dc30addfb6..b5bcd123c73711cc6449d46c6fec095765d840ac 100644 (file)
@@ -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"