GNU bug report logs - #77264
split-and-decode-uri-path must respect trailing slash

Previous Next

Package: guile;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Tue, 25 Mar 2025 22:45:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 77264 <at> debbugs.gnu.org
Subject: bug#77264: split-and-decode-uri-path must respect trailing slash
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!




This bug report was last modified 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.