eprintsug / DataCiteDoi

Registration of DOIs via DataCite
GNU General Public License v3.0
2 stars 5 forks source link

possible duplicate mimetype setting #36

Open goetzk opened 6 years ago

goetzk commented 6 years ago

DataCiteXML.pm sets mime type during new()

$self->{mimetype} = 'application/xml; charset=utf-8';

DataCiteEvent.pm sets mime type when calling datacite_request

my($response_content, $response_code) =  datacite_request("POST", $url."metadata", $user_name, $user_pw, xml, "application/xml;charset=UTF-8");
goetzk commented 6 years ago

I just noticed this happens quite a bit

 grep -r "application/xml" *
DataCiteDoi.epmi:          <mime_type>application/xml</mime_type>
lib/plugins/EPrints/Plugin/Event/DataCiteEvent.pm:      my($response_content, $response_code) =  datacite_request("POST", $url."metadata", $user_name, $user_pw, $xml, "application/xml;charset=UTF-8");
lib/plugins/EPrints/Plugin/Event/DataCiteEvent.pm:      'Accept'  => 'application/xml',
lib/plugins/EPrints/Plugin/Event/DataCiteEvent.pm:    "Accept: application/xml",
lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm:        $self->{mimetype} = 'application/xml; charset=utf-8';