'url-http-proxy-basic-auth-storage))
(url-get-authentication url-http-proxy nil 'any nil))))
(real-fname (url-filename url-http-target-url))
- (host (url-host url-http-target-url))
+ (host (url-http--encode-string (url-host url-http-target-url)))
(auth (if (cdr-safe (assoc "Authorization" url-http-extra-headers))
nil
(url-get-authentication (or
(concat
;; The request
(or url-http-method "GET") " "
- (if using-proxy (url-recreate-url url-http-target-url) real-fname)
+ (url-http--encode-string
+ (if using-proxy (url-recreate-url url-http-target-url) real-fname))
" HTTP/" url-http-version "\r\n"
;; Version of MIME we speak
"MIME-Version: 1.0\r\n"
(url-http-debug "Request is: \n%s" request)
request))
+(defun url-http--encode-string (s)
+ (if (multibyte-string-p s)
+ (encode-coding-string s 'us-ascii)
+ s))
+
;; Parsing routines
(defun url-http-clean-headers ()
"Remove trailing \r from header lines.