summaryrefslogtreecommitdiff
path: root/src/htsparse.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-03-19 13:03:26 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-03-19 13:03:26 +0000
commit0183f4dd84d8cc44d617fb48436881e79e2bf0f2 (patch)
treed475719783d1cecb39934b739895426ad2967df2 /src/htsparse.c
parent1096a6b82c4110f7a15132c9a2b525899d62380c (diff)
httrack 3.44.1
Diffstat (limited to 'src/htsparse.c')
-rw-r--r--src/htsparse.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/htsparse.c b/src/htsparse.c
index 34ef831..1d83add 100644
--- a/src/htsparse.c
+++ b/src/htsparse.c
@@ -3427,8 +3427,8 @@ int hts_mirror_check_moved(htsmoduleStruct* str, htsmoduleStructExtended* stre)
} // bloc
// erreur HTTP (ex: 404, not found)
} else if (
- (r->statuscode==412)
- || (r->statuscode==416)
+ (r->statuscode==HTTP_PRECONDITION_FAILED)
+ || (r->statuscode==HTTP_REQUESTED_RANGE_NOT_SATISFIABLE)
) { // Precondition Failed, c'est à dire pour nous redemander TOUT le fichier
if (fexist(liens[ptr]->sav)) {
remove(liens[ptr]->sav); // Eliminer
@@ -4283,6 +4283,9 @@ int hts_wait_delayed(htsmoduleStruct* str,
return -1;
}
+ /* We added the link before the parser recorded it -- the background download MUST NOT clean silently this entry! (Petr Gajdusek) */
+ back[b].early_add = 1;
+
/* Cache read failed because file does not exists (bad delayed name!)
Just re-add with the correct name, as we know the MIME now!
*/
@@ -4329,6 +4332,10 @@ int hts_wait_delayed(htsmoduleStruct* str,
XH_uninit; // désallocation mémoire & buffers
return -1;
}
+
+ /* We added the link before the parser recorded it -- the background download MUST NOT clean silently this entry! (Petr Gajdusek) */
+ back[b].early_add = 1;
+
if ((opt->debug>1) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Type immediately loaded from cache: %s"LF, delayed_back.r.contenttype);
test_flush;