summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 283126f6b..c86f9407e 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -399,7 +399,10 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
// go for it - if the file exists, append on it
File = new FileFd(Itm->DestFile, FileFd::WriteAny);
- Server = CreateServerState(Itm->Uri);
+ if (Server == nullptr || Server->Comp(Itm->Uri) == false)
+ Server = CreateServerState(Itm->Uri);
+ else
+ Server->Reset(false);
if (Server->InitHashes(Itm->ExpectedHashes) == false)
return false;