garydgregory commented on a change in pull request #92:
URL: https://github.com/apache/commons-vfs/pull/92#discussion_r438478951
##########
File path:
commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileTypeMap.java
##########
@@ -57,7 +58,7 @@ public String getScheme(final FileObject file) throws
FileSystemException {
// Check the file's mime type for a match
final FileContent content = file.getContent();
final String mimeType = content.getContentInfo().getContentType();
- if (mimeType != null) {
+ if (mimeType != null && !mimeType.equals(MIME_TYPE_OCTET_STREAM)) {
Review comment:
This does not feel right. One the one hand we tell caller to call
`addMimeType(String, String)` but then we ignore that entry for one specific
value. That does not make sense. I'd like to hear from others who might be more
familiar with this part of the code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]