Bug 21109

Summary: oai.pl returns invalid resumptionToken cursor
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: Web servicesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P4    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17785
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21102    

Description Pablo AB 2018-07-24 00:20:22 UTC
Tested with https://github.com/zimeon/oaipmh-validator
and curl -s "baseURL?verb=ListRecords&metadataPrefix=oai_dc" | xmllint --format - | grep resumptionToken

### Checking for correct use of resumptionToken (if used)
REQUEST: baseURL?verb=ListRecords&metadataPrefix=oai_dc GET
FAIL:    A cursor value was supplied with the resumptionToken but it did not have the correct value zero for the first response. The value was '50'.

This value is OAI-PMH:MaxCount syspref.

_cursor_ indicate the number of previous replies have already delivered: "cursor -- a count of the number of elements of the complete list thus far returned (i.e. cursor starts at 0)."
See https://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl
See https://www.openarchives.org/OAI/2.0/guidelines-harvester.htm#resumptionToken