Binary files were detected based on the header. The current implementation assumes that those 80 bytes will be always NIL (0x0). This fix proposes that a file is binary if:
At least one of the bytes is nil (of those 80 at the beginning)
The header starts with "solid "
This change is made so that compatibility is increased. For example, support STL files that are exported from Blender, or other applications. These files contain information in the header about the app that did the export.
This looks good to me, I'll go ahead an merge the change. As a followup, do you have an STL file with a non-zero header that could be added as a unit test?
Binary files were detected based on the header. The current implementation assumes that those 80 bytes will be always NIL (0x0). This fix proposes that a file is binary if:
This change is made so that compatibility is increased. For example, support STL files that are exported from Blender, or other applications. These files contain information in the header about the app that did the export.