When ingesting certain types of files, the characterization by FITS can report multiple mime types as a comma-separated attribute. The CharacterizationService document does not detect or clean this, nor does the OM document.
Once the File is updated and persisted to Fedora, the invalid mime type results in 500 errors thrown for any GET or HEAD requests for the file (with Jersey throwing a parsing exception on the comma).
It's reasonable to say that both FITS (or Droid) and Fedora are behaving badly in this case, but it is also reasonable to be able to clean up or transform values after extraction. OM does not have a mechanism for doing transformation of a term beyond the hoisting done with proxied terms, so a new method on the FitsDocument is the best candidate.
A snippet showing the problematic mimetype attribute:
When ingesting certain types of files, the characterization by FITS can report multiple mime types as a comma-separated attribute. The CharacterizationService document does not detect or clean this, nor does the OM document.
Once the File is updated and persisted to Fedora, the invalid mime type results in 500 errors thrown for any GET or HEAD requests for the file (with Jersey throwing a parsing exception on the comma).
It's reasonable to say that both FITS (or Droid) and Fedora are behaving badly in this case, but it is also reasonable to be able to clean up or transform values after extraction. OM does not have a mechanism for doing transformation of a term beyond the hoisting done with proxied terms, so a new method on the FitsDocument is the best candidate.
A snippet showing the problematic mimetype attribute: