From: Tim Vaughan Date: Thu, 31 Oct 2019 17:13:25 +0000 (+0100) Subject: Fixed hole in gemini URL parsing. X-Git-Tag: v2.4.0~4^2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=39299728cafbcd98dc07cd45e4e5d11edc26f3a8;p=elpher.git Fixed hole in gemini URL parsing. --- diff --git a/elpher.el b/elpher.el index 8d4aa0e..19e78ef 100644 --- a/elpher.el +++ b/elpher.el @@ -987,7 +987,9 @@ For instance, the filename /a/b/../c/./d will reduce to /a/c/d" (let ((address (url-generic-parse-url url))) (unless (and (url-type address) (not (url-fullness address))) ;avoid mangling mailto: urls (setf (url-fullness address) t) - (unless (url-host address) ;if there is an explicit host, filenames are absolute + (if (url-host address) ;if there is an explicit host, filenames are absolute + (if (string-empty-p (url-filename address)) + (setf (url-filename address) "/")) ;ensure empty filename is marked as absolute (setf (url-host address) (url-host (elpher-node-address elpher-current-node))) (unless (string-prefix-p "/" (url-filename address)) ;deal with relative links (setf (url-filename address)