[Bug 40642] New: Koha::OAI::Server::Repository self_url incorrect when using Plack
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40642 Bug ID: 40642 Summary: Koha::OAI::Server::Repository self_url incorrect when using Plack Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Koha's OAI-PMH server returns the "request URL" in a "request" element. If a requestURL isn't provided as an argument to a response, CGI::self_url() is used. In Koha, we often use $repository->self_url(), but self_url isn't a method in the $repository object or its parent classes. Rather, CGI::self_url is imported into Koha::OAI::Server::Repository and via Perl automagic it acts like a method. This is a problem for a number of reasons. Firstly, the path is incorrect. In KTD when using Plack, you wind up with a request URL like http://localhost:8080/opac/oai.pl. If you have a reverse proxy and you're doing things like HTTPS offloading, you'll wind up with a HTTP instead of a HTTPS URL. Stuff like that. This also affects the "baseURL" used in the Identify response. -- We should have a method like "repo_url()" where we use OPACBaseURL and rewrite the path using something like the following: s!^/opac!/cgi-bin/koha! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40642 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Note that I've been setting the requestURL in Koha::OAI::Server::Repository for many years locally, as I had some OAI-PMH consumer that needed it fixed. But there are other Koha/OAI/Server/* modules that need to be updated too. I'll need to do some refactoring of what I have to cover what I describe in the "Description", but it shouldn't be that hard. Just need to get a round tuit... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40642 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org