Instead of allowing some mime types, disallow text types

This commit is contained in:
Martin Fietz 2016-05-20 15:07:59 +02:00
parent 0290d38f52
commit 6655abc92e
1 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,7 @@ public class HttpDownloader extends Downloader {
if(request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
String contentType = response.header("Content-Type");
Log.d(TAG, "content type: " + contentType);
if(!contentType.startsWith("audio/") && !contentType.startsWith("video/") &&
!contentType.equals("application/octet-stream")) {
if(contentType.startsWith("text/")) {
onFail(DownloadError.ERROR_FILE_TYPE, null);
return;
}