mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Normalize URL path correctly for http
* lisp/url/url-http.el (url-http-create-request): Prepend "/" if it's missing from the filename. (Bug#78640)
This commit is contained in:
parent
8be65cf6e0
commit
7e62c2cf3a
1 changed files with 4 additions and 2 deletions
|
|
@ -325,8 +325,10 @@ Use `url-http-referer' as the Referer-header (subject to `url-privacy-level')."
|
|||
url-http-target-url)
|
||||
nil 'any nil)))
|
||||
(ref-url (url-http--encode-string url-http-referer)))
|
||||
(if (equal "" real-fname)
|
||||
(setq real-fname "/"))
|
||||
;; RFC 3986 section 6.2.3 says an empty path should be normalized to
|
||||
;; "/", even if the filename is non-empty. (Bug#78640)
|
||||
(unless (string-match-p "\\`/" real-fname)
|
||||
(setq real-fname (concat "/" real-fname)))
|
||||
(setq no-cache (and no-cache (string-match "no-cache" no-cache)))
|
||||
(if auth
|
||||
(setq auth (concat "Authorization: " auth "\r\n")))
|
||||
|
|
|
|||
Loading…
Reference in a new issue