Bug 14664

Summary: Harvesting records of an non-existent set, instead of an error return all the records
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: Web servicesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: ugurbulgan
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14721
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Pablo AB 2015-08-07 15:49:01 UTC
Steps:
  - Enable syspref OAI-PMH and leave OAI-PMH:ConfFile empty.
  - Set an OAI set on Home › Administration › OAI sets configuration
  - Remember the setSpec you choose (the real set primary key), for example setSpec==THESIS
  - Fetch with set=THESIS, you will get records on that set.
  - Now fetch records with set=bananas.
Expected result:
  A badArgument error like this one: http://digital.bl.fcen.uba.ar/gsdl-282/cgi-bin/oaiserver.cgi?verb=ListRecords&metadataPrefix=oai_dc&set=bananas (Greenstone v2.82)
Actual result:
  List ALL records, like here: http://catalog.bywatersolutions.com/cgi-bin/koha/oai.pl?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=bananas
Reference: 
  https://www.openarchives.org/OAI/2.0/guidelines-harvester.htm#Sets
  https://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions