Skip Menu |

This queue is for tickets about the OAI-Harvester CPAN distribution.

Report information
The Basics
Id: 124270
Status: open
Priority: 0/
Queue: OAI-Harvester

People
Owner: ThB [...] gymel.com
Requestors: paolo.tealdi [...] polito.it
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Small bug (?) in Net::OAI:Harvester
Date: Tue, 30 Jan 2018 14:46:41 +0100
To: bug-OAI-Harvester [...] rt.cpan.org
From: Paolo Tealdi <paolo.tealdi [...] polito.it>
Good morning, using Net::OAI::Harvester i noticed that for one site i had to patch the Harvester.pm file in this way: --- Harvester.pm.OLD    2018-01-30 14:40:25.935278000 +0100 +++ Harvester.pm        2018-01-30 11:58:20.308631000 +0100 @@ -705,7 +705,7 @@      }      if ( my $ct = $response->header("Content-Type") ) {          debug( "Content-type $ct in HTTP response" ); -        unless ( $ct =~ /^text\/xml(;|$)/ ) { +        unless ( $ct =~ /^(text|application)\/xml(;|$)/ ) {              return (error => Net::OAI::Error->new(errorCode => 'xmlContentError',                                                  errorString => "Content-Type: text/xml is mandatory (got: $ct)!"),                                                    HTTPError => $response, After this patch it worked like a charm. Best regards, Paolo Tealdi -- Ing. Paolo Tealdi Area IT - Politecnico Torino Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906625 Indirizzo/Address : C.so Duca degli Abruzzi, 24 - 10129 Torino - ITALY Skype : tealdi.paolo Please consider your environmental responsibility before printing this e-mail
Hi Paolo, On Tue Jan 30 09:14:10 2018, paolo.tealdi@polito.it wrote: Show quoted text
> Good morning, > > using Net::OAI::Harvester i noticed that for one site i had to patch > the > Harvester.pm file in this way:
[accepting responses of content type application/xml] According to the spec < https://www.openarchives.org/OAI/openarchivesprotocol.html#HTTPResponseFormat > "The Content-Type returned for all OAI-PMH requests *must* be text/xml." I perceive the OAI-PMH specification as being quite rigid, at least for repositories (e.g. to be conformant they *must* respond with an error if any additional parameter is provided in the request, even if that would serve some handy, private enhancements). Of course this does not mandate clients to behave equally rigid. But to what extend should one support broken repositories? viele Grüße Thomas Berger
Subject: Re: [rt.cpan.org #124270] Small bug (?) in Net::OAI:Harvester
Date: Wed, 31 Jan 2018 08:42:33 +0100
To: bug-OAI-Harvester [...] rt.cpan.org
From: Paolo Tealdi <paolo.tealdi [...] polito.it>
Hi Thomas, shame on me! I'll send a ticket to our Repository Manager. It seems they had some fancy ideas on developing OAI-PMH handler. It should be a Dspace derivate software but Harvard answers correctly. :-(( Best regards and sorry to bother you Paolo Tealdi https://dash.harvard.edu/oai/request?verb=Identify GET HTTP/1.1 200 OK Host: dash.harvard.edu User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: it,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate, br Cookie: JSESSIONID=D08EC3522BA999B9CB53F7C39E5EE742; __utma=89025422.863074567.1517383725.1517383725.1517383725.1; __utmb=89025422.1.10.1517383725; __utmc=89025422; __utmz=89025422.1517383725.1.1.utmcsr=osc.hul.harvard.edu|utmccn=(referral)|utmcmd=referral|utmcct=/dash/mydash/; __utmt=1 Connection: keep-alive Upgrade-Insecure-Requests: 1 Content-Encoding: gzip Content-Type: text/xml;charset=UTF-8 <----- !!! Date: Wed, 31 Jan 2018 07:36:04 GMT Server: Apache-Coyote/1.1 Content-Length: 653 Connection: keep-alive Il 30/01/2018 20:52, Thomas Berger via RT ha scritto: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=124270 > > > Hi Paolo, > > > On Tue Jan 30 09:14:10 2018, paolo.tealdi@polito.it wrote:
>> Good morning, >> >> using Net::OAI::Harvester i noticed that for one site i had to patch >> the >> Harvester.pm file in this way:
> [accepting responses of content type application/xml] > > According to the spec < https://www.openarchives.org/OAI/openarchivesprotocol.html#HTTPResponseFormat > > > "The Content-Type returned for all OAI-PMH requests *must* be text/xml." > > I perceive the OAI-PMH specification as being quite rigid, at least for repositories (e.g. to be conformant they *must* respond with an error if any additional parameter is provided in the request, even if that would serve some handy, private enhancements). Of course this does not mandate clients to behave equally rigid. But to what extend should one support broken repositories? > > viele Grüße > Thomas Berger >
-- Ing. Paolo Tealdi Area IT - Politecnico Torino Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906625 Indirizzo/Address : C.so Duca degli Abruzzi, 24 - 10129 Torino - ITALY Skype : tealdi.paolo Please consider your environmental responsibility before printing this e-mail