]> git.koha-community.org Git - koha.git/commit
Bug 14721: OAI-PMH must return error when no results
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 25 Aug 2015 09:33:04 +0000 (11:33 +0200)
committerLiz Rea <wizzyrea@gmail.com>
Tue, 22 Sep 2015 04:42:41 +0000 (16:42 +1200)
commitb3b10df1e480f16e74abc8eef3ac568d84005c4b
tree3f812247e07771ee298528649355c40fd6783f17
parent25350f519d24257f6ed690425ce853488b21999e
Bug 14721: OAI-PMH must return error when no results

When getting records from OAI-PMH, an error must be returned if there is no results.

See : http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions

Test plan :
- Enable OAI webservice
- Perform a query that will return no results. ie : /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2099-12-30&until=2099-12-31
=> Without patch you get a response with :
   <ListRecords/>
=> With patch you get a response with error code :
   <error code="noRecordsMatch">No records match the given criteria</error>
- Check a good query returns still results
- Same test with ListIdentifiers verb

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64992a05ce87af7bf595c8d6f0b9d528887a2e44)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
(cherry picked from commit 3d8e059513db08f2070e33ea1562d7cdd915797c)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
opac/oai.pl