Merge pull request #1954 from mfietz/issue/1937-content-type-take-2
Downloader: Fix invalid media mime type
This commit is contained in:
commit
1048735327
@ -185,8 +185,7 @@ public class HttpDownloader extends Downloader {
|
|||||||
if(request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
|
if(request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
|
||||||
String contentType = response.header("Content-Type");
|
String contentType = response.header("Content-Type");
|
||||||
Log.d(TAG, "content type: " + contentType);
|
Log.d(TAG, "content type: " + contentType);
|
||||||
if(!contentType.startsWith("audio/") && !contentType.startsWith("video/") &&
|
if(contentType.startsWith("text/")) {
|
||||||
!contentType.equals("application/octet-stream")) {
|
|
||||||
onFail(DownloadError.ERROR_FILE_TYPE, null);
|
onFail(DownloadError.ERROR_FILE_TYPE, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user