From 39299728cafbcd98dc07cd45e4e5d11edc26f3a8 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Thu, 31 Oct 2019 18:13:25 +0100 Subject: [PATCH] Fixed hole in gemini URL parsing. --- elpher.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.20.1