Subject: split-and-decode-uri-path must respect trailing slash

From: Arun Isaac <[email-masked]>
Date: Tue, 25 Mar 2025 22:43:41 +0000

Hi Guile,

Both (split-and-decode-uri-path "foo/bar") and
(split-and-decode-uri-path "foo/bar/") return '("foo" "bar"). The
trailing slash is lost. The trailing slash traditionally represents a
directory path, and is significant. I would expect
(split-and-decode-uri-path "foo/bar") to return '("foo" "bar") and
(split-and-decode-uri-path "foo/bar/") to return '("foo" "bar" "").

In contrast, encode-and-join-uri-path correctly outputs trailing
slashes. (encode-and-join-uri-path (list "foo" "bar")) returns "foo/bar"
whereas (encode-and-join-uri-path (list "foo" "bar" "")) returns
"foo/bar/".

I'm happy to provide a patch if we agree that this is a bug.

Thanks!