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