Koha-clms/Koha/OAI
Tomás Cohen Arazi 2224de5a5a
Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+
CGI.pm 4.68 (shipped with Debian 13/Trixie) changed the behavior of
self_url() to include a trailing slash when there's no path component.
This causes OAI-PMH tests to fail as they expect URLs without trailing
slashes.

This patch strips the trailing slash from both the requestURL field in
OAI responses and the baseURL field in Identify responses to maintain
compatibility across CGI.pm versions.

Test plan:
1. Start a 'trixie' KTD:
   $ KOHA_IMAGE=main-trixie ktd --proxy --name trixie up -d
   $ ktd --name trixie --wait-ready 120
2. Run the tests:
   $ ktd --name trixie --shell
  k$ prove t/db_dependent/OAI/Server.t
=> FAIL: Tests fail!
3. Apply this patch
5. Repeat 2
6. Repeat 1-2 with a 'bookworm' image
=> SUCCESS: Tests pass too!
7. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-17 13:24:33 -07:00
..
Client Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Server Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+ 2025-12-17 13:24:33 -07:00