diff --git a/fetch2/src/main/java/com/tonyodev/fetch2/downloader/DownloadManagerImpl.kt b/fetch2/src/main/java/com/tonyodev/fetch2/downloader/DownloadManagerImpl.kt index a94be2fd..b0ac210b 100644 --- a/fetch2/src/main/java/com/tonyodev/fetch2/downloader/DownloadManagerImpl.kt +++ b/fetch2/src/main/java/com/tonyodev/fetch2/downloader/DownloadManagerImpl.kt @@ -258,7 +258,12 @@ class DownloadManagerImpl(private val httpDownloader: Downloader<*, *>, } private fun getFileDownloader(download: Download, downloader: Downloader<*, *>): FileDownloader { - val request = getRequestForDownload(download) + val originalRequest = getRequestForDownload(download) + val request = if (downloader.getHeadRequestMethodSupported(originalRequest)) { + getRequestForDownload(download, HEAD_REQUEST_METHOD) + } else { + originalRequest + } val supportedDownloadTypes = downloader.getRequestSupportedFileDownloaderTypes(request) return if (downloader.getRequestFileDownloaderType(request, supportedDownloadTypes) == Downloader.FileDownloaderType.SEQUENTIAL) { SequentialFileDownloaderImpl(