Bugzilla – Attachment 22239 Details for
Bug 10974
OAI-PMH Resumption Tokens Do Not Handle Time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10974 - OAI-PMH Resumption Tokens Do Not Handle Time
Bug-10974---OAI-PMH-Resumption-Tokens-Do-Not-Handl.patch (text/plain), 2.65 KB, created by
Petter Goksøyr Åsen
on 2013-10-21 23:57:22 UTC
(
hide
)
Description:
Bug 10974 - OAI-PMH Resumption Tokens Do Not Handle Time
Filename:
MIME Type:
Creator:
Petter Goksøyr Åsen
Created:
2013-10-21 23:57:22 UTC
Size:
2.65 KB
patch
obsolete
>From 8ffdfd117985573e3a6e1c7178288bf919bd71ad Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 30 Sep 2013 15:47:03 +1000 >Subject: [PATCH] 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@gmail.com> > >I understand; I can now confirm the behaviour described in the test plan. >--- > opac/oai.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/oai.pl b/opac/oai.pl >index 7aa5a7d..b453408 100755 >--- a/opac/oai.pl >+++ b/opac/oai.pl >@@ -89,7 +89,7 @@ sub new { > my ($metadata_prefix, $offset, $from, $until, $set); > if ( $args{ resumptionToken } ) { > ($metadata_prefix, $offset, $from, $until, $set) >- = split( ':', $args{resumptionToken} ); >+ = split( '/', $args{resumptionToken} ); > } > else { > $metadata_prefix = $args{ metadataPrefix }; >@@ -110,7 +110,7 @@ sub new { > $self->{ set } = $set; > > $self->resumptionToken( >- join( ':', $metadata_prefix, $offset, $from, $until, $set ) ); >+ join( '/', $metadata_prefix, $offset, $from, $until, $set ) ); > $self->cursor( $offset ); > > return $self; >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10974
:
21633
|
22239
|
22450