Bug 21107 - oai.pl error response did not contain error code 'badResumptionToken' when it should
Summary: oai.pl error response did not contain error code 'badResumptionToken' when it...
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P4 normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 21102
  Show dependency treegraph
 
Reported: 2018-07-24 00:16 UTC by Pablo AB
Modified: 2021-11-15 12:21 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2018-07-24 00:16:06 UTC
Tested with https://github.com/zimeon/oaipmh-validator
REQUEST: baseURL?verb=ListRecords&resumptionToken=junk GET
FAIL:    Exception/error response did not contain error code 'badResumptionToken'

See https://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions and 4.3 ListIdentifiers
Comment 1 Tomás Cohen Arazi 2021-11-15 12:21:18 UTC
I've been briefly poking at this. My findings are that the resumption token itself doesn't need to have a specific structure and is up to the implementation to defined how that token should look like.

Koha uses this structure:

"$metadata_prefix/$cursor/$from/$until/$set/$deleted/0/$next_id"

This is an extreme reasoning, but things can be underspecified so they fallback to some default. I'm not sure if 'junk' couldn't be some valid resumption token if we decided to encode/compress the resumption token...

That is, somehow, a weakness on the validation tool. They picked 'junk' meaning 'some random word'.

That said, though: we know the structure of our resumption tokens (as pasted above) and we could be returning 'badResumptionToken' when the request doesn't comform to that structure.

Do we agree?