summaryrefslogtreecommitdiffstats
path: root/gallery_dl/downloader/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/downloader/http.py')
-rw-r--r--gallery_dl/downloader/http.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py
index 844e422..64a2978 100644
--- a/gallery_dl/downloader/http.py
+++ b/gallery_dl/downloader/http.py
@@ -164,7 +164,11 @@ class HttpDownloader(DownloaderBase):
self.downloading = False
if self.mtime:
- pathfmt.kwdict["_mtime"] = response.headers.get("Last-Modified")
+ pathfmt.kwdict.setdefault(
+ "_mtime", response.headers.get("Last-Modified"))
+ else:
+ pathfmt.kwdict["_mtime"] = None
+
return True
def receive(self, response, file):