diff --git a/Koha/OAI/Server/Identify.pm b/Koha/OAI/Server/Identify.pm index cb234d376a..71383c3845 100644 --- a/Koha/OAI/Server/Identify.pm +++ b/Koha/OAI/Server/Identify.pm @@ -33,6 +33,7 @@ sub new { my $baseURL = $repository->self_url(); $baseURL = $+{base_url} if $baseURL =~ m/(?.*)\?.*/; + $baseURL =~ s{/$}{}; # Strip trailing slash for CGI.pm 4.68+ compatibility my $self = $class->SUPER::new( baseURL => $baseURL, diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 82bc89efe7..b1812df6c8 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -157,6 +157,11 @@ sub new { $response = $class->new( $self, %attr ); } + # Strip trailing slash from requestURL for CGI.pm 4.68+ compatibility + my $url = $response->requestURL(); + $url =~ s{/$}{}; + $response->requestURL($url); + $response->set_handler( XML::SAX::Writer->new( Output => *STDOUT ) ); $response->xslt("/opac-tmpl/xslt/OAI.xslt"); $response->generate;