Merge pull request #2192 from Cj-Malone/2190-invalid-mime-fix

Fallback to mime type from the URL when the defined is invalid
This commit is contained in:
Martin Fietz 2016-11-27 10:37:38 +01:00 committed by GitHub
commit cf8deb12ef
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ public class NSRSS20 extends Namespace {
boolean validType = false;
boolean validUrl = !TextUtils.isEmpty(url);
if (type == null) {
if(SyndTypeUtils.enclosureTypeValid(type)) {
validType = true;
} else {
type = SyndTypeUtils.getMimeTypeFromUrl(url);
}