Merge pull request #1954 from mfietz/issue/1937-content-type-take-2

Downloader: Fix invalid media mime type
This commit is contained in:
Martin Fietz 2016-06-01 10:23:05 +02:00
commit 1048735327
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;
}