[Koha-bugs] [Bug 10974] OAI-PMH Resumption Tokens Do Not Handle Time

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 22 01:57:22 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10974

Petter Goksøyr Åsen <boutrosboutrosboutros at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #21633|0                           |1
        is obsolete|                            |

--- Comment #5 from Petter Goksøyr Åsen <boutrosboutrosboutros at gmail.com> ---
Created attachment 22239
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22239&action=edit
Bug 10974 - OAI-PMH Resumption Tokens Do Not Handle Time

This patch changes the value separator in OAI-PMH resumption tokens
from colons to slashes, so that the token string isn't split incorrectly
when a time is included.

TEST PLAN:

1) Turn on the OAI-PMH server syspref in Koha
2) Send a ListRecords request using 'from' and 'until' arguments that
include times (Best to use very far apart times so that you retrieve
more than 50 records which will likely be the trigger for a resumptionToken).
Here is an example:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
metadataPrefix=oai_dc&from=2012-09-05T13:44:33Z&until=2014-09-05T13:44:33Z

N.B. Replace KOHAINSTANCE with the URL of your Koha instance.

3) Scroll down to the bottom of the page until you find the resumptionToken.
It will look similar to this:

<resumptionToken cursor="50">
oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:
</resumptionToken>

4) Copy that resumption token and send a request with it like so:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
resumptionToken=oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:

5) The page should (incorrectly) show no records.

6) APPLY PATCH

7) Repeat steps 2, 3, and 4

8) Note that the resumptionToken now uses slashes (e.g. /) instead of
colons.

Note also that now the second request will show records!!!

N.B. This will only happen if Koha has enough records to serve to you.
If your Koha has less than 50 records, try lowering the number provided
in the "OAI-PMH:MaxCount" system preference.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros at gmail.com>

I understand; I can now confirm the behaviour described in the test plan.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list