PeterAlfredLee commented on a change in pull request #92:
URL: https://github.com/apache/commons-vfs/pull/92#discussion_r438501370



##########
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:
       Actually `application/octet-stream` is the default value for extensions 
not in the [mime type 
table](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
 I'm just adding one more extension check using `VFS's extensionMap` if we 
encountered a `application/octet-stream` here.




----------------------------------------------------------------
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]


Reply via email to