Instead of allowing some mime types, disallow text types
This commit is contained in:
parent
0290d38f52
commit
6655abc92e
@ -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