From unknown Wed Jun 18 00:01:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77264 <77264@debbugs.gnu.org> To: bug#77264 <77264@debbugs.gnu.org> Subject: Status: split-and-decode-uri-path must respect trailing slash Reply-To: bug#77264 <77264@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:01:43 +0000 retitle 77264 split-and-decode-uri-path must respect trailing slash reassign 77264 guile submitter 77264 Arun Isaac severity 77264 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 25 18:44:21 2025 Received: (at submit) by debbugs.gnu.org; 25 Mar 2025 22:44:22 +0000 Received: from localhost ([127.0.0.1]:40360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1txD0P-0006yu-KN for submit@debbugs.gnu.org; Tue, 25 Mar 2025 18:44:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40586) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1txD0L-0006yY-6D for submit@debbugs.gnu.org; Tue, 25 Mar 2025 18:44:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1txD0C-0001GU-AX for bug-guile@gnu.org; Tue, 25 Mar 2025 18:44:09 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1txD07-0006zY-9n for bug-guile@gnu.org; Tue, 25 Mar 2025 18:44:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1742942627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=OgFJv3r1NZdaWzvFIbMMPzjHLSCoJobSeuTHr4VvNcA=; b=XuHBuwnodrUZJQc+VR5kUuIcaosfxOsr/Ukmorav/drZGO8OuUTiAJT87nP3yAboqIyv3M +lyOXiNMHr3ByqbwOmTZXf4KodGTiQaL0zKTZ2y7DmBaCgGuvXH/f3cguZz2MMcBmgYWOq JMQLiqTTs1T4EjkzgfU90JxTbFaKR5nnIq8KU4xt/lUVW7ncwXISTdYeGbuO8hOOo92vi1 Sp75aXYGQDjuD5GwZlnitBP6KtSTUqI+G66ECA4swc4Om86x7zE9pTadB/2K0rtlOlmOhC c0lcSCFK6VpZrwENjWIyBNb4cldnd4WupfcUtj72IqpnGUOnEE9bLA0V6XpNqw== Received: from localhost ( [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id d6d24043 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 25 Mar 2025 22:43:46 +0000 (UTC) From: Arun Isaac To: bug-guile@gnu.org Subject: split-and-decode-uri-path must respect trailing slash Date: Tue, 25 Mar 2025 22:43:41 +0000 Message-ID: <87jz8cohnm.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) 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!