The REST API uses the following method
to guess the mimetype instead than
dspace 5: org.dspace.content.FormatIdentifier.guessFormat(Context, Bitstream)
dspace 6 & 7: org.dspace.content.service.BitstreamFormatService.guessFormat(Context, Bitstream)
far from be perfect but at least we should use a consistent strategy in all the layer.
In our specific case, this lead to an issue trying to ingest office file via REST as it rely on the JDK URLConnection and also if the doc, docx extension is added to the dspace file format registry it is not found