Detect rar archives by mime type

RAR archives might not have .rar extension, see [Wikipedia](https://en.wikipedia.org/wiki/RAR_(file_format))
This commit is contained in:
Tobias Mühl 2021-04-28 15:54:19 +07:00 committed by GitHub
parent ccbe02218a
commit a8864e2abd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,9 @@ func IsZstdContent(data []byte) bool {
if strings.HasSuffix(mtype, "script") {
return true, true
}
if strings.HasSuffix(mtype, "vnd.rar) {
return false, true
}
}
if strings.HasPrefix(mtype, "audio/") {