Affects Version/s: None
Fix Version/s: Fedora 5.0.0
In testing with the Hyku repository app on top of Fedora (using a build from the master branch, May 2017), occasional errors occur when files are deposited but fail to complete the process properly. When attempting to retrieve or delete the item from Fedora, a 500 response is returned. The errors in the log are:
java.lang.IllegalArgumentException: Error parsing media type 'cannot open `/tmp/40e8273e-1ea8-48ec-916c-e78bc06ba1ea20170608-25523-m6g42x' (No such file or directory)'
Caused by: java.text.ParseException: White space not allowed.
Requesting fcr:metadata on the item shows the following:
ebucore:hasMimeType "cannot open `/tmp/40e8273e-1ea8-48ec-916c-e78bc06ba1ea20170608-25523-m6g42x' (No such file or directory)" ;
The mimetype set here is clearly invalid. While it seems likely that the primary issue is due to the Hyku app supplying an invalid mimetype, there should be better data validation in Fedora to ensure that a mimetype which cannot be parsed is not allowed into the repository.
Alternatively, if it is desirable to allow invalid data to be stored, then the API should fail gracefully when that data is requested and allow the item or the metadata itself to be removed or updated without error.