Fix thinko in setting url-portspec
* lisp/url/url-expand.el (url-default-expander): Set `url-portspec' (bug#42869).
This commit is contained in:
parent
5b463af8dd
commit
f4e7f7695f
2 changed files with 8 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ path components followed by `..' are removed, along with the `..' itself."
|
|||
;; Well, they told us the scheme, let's just go with it.
|
||||
nil
|
||||
(setf (url-type urlobj) (or (url-type urlobj) (url-type defobj)))
|
||||
(setf (url-port urlobj) (or (url-portspec urlobj)
|
||||
(setf (url-portspec urlobj) (or (url-portspec urlobj)
|
||||
(and (string= (url-type urlobj)
|
||||
(url-type defobj))
|
||||
(url-port defobj))))
|
||||
|
|
|
|||
|
|
@ -100,6 +100,13 @@
|
|||
(should (equal (url-expand-file-name "foo#bar" "http://host/foobar") "http://host/foo#bar"))
|
||||
(should (equal (url-expand-file-name "foo#bar" "http://host/foobar/") "http://host/foobar/foo#bar")))
|
||||
|
||||
(ert-deftest url-expand-file-name/relative-resolution-file-url ()
|
||||
"RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.1. Normal Examples"
|
||||
(should (equal (url-expand-file-name "bar.html" "file:///a/b/c/foo.html") "file:///a/b/c/bar.html"))
|
||||
(should (equal (url-expand-file-name "bar.html" "file:///a/b/c/") "file:///a/b/c/bar.html"))
|
||||
(should (equal (url-expand-file-name "../d/bar.html" "file:///a/b/c/") "file:///a/b/d/bar.html"))
|
||||
(should (equal (url-expand-file-name "../d/bar.html" "file:///a/b/c/foo.html") "file:///a/b/d/bar.html")))
|
||||
|
||||
(provide 'url-expand-tests)
|
||||
|
||||
;;; url-expand-tests.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue