Commit graph

1 commit

Author SHA1 Message Date
44bc1b093c [FIX] qemu : reprendre un téléchargement d'image coupé
Une image de VM pèse un demi-gigaoctet : une coupure y est bien plus probable
que sur une page. Le contrôle de complétude existait — sans lui un .part
tronqué passait pour une image, donnant un qcow2 valide mais VIDE — mais il
jetait les octets reçus et renvoyait l'utilisateur à un « curl -C - » tapé à
la main. Le transfert se reprend désormais sur le même miroir, trois essais,
par un « Range » qui demande la suite ; on ne change de miroir qu'ensuite. Un
serveur qui ignore le Range rend le fichier entier, et l'on repart alors de
zéro plutôt que de doubler les octets déjà là.
Vérifié : 5 tests contre un serveur qui coupe au tiers, image reconstituée à
l'octet près, et le .part tronqué part quand les reprises s'épuisent.

--- EN ---

A VM image weighs half a gigabyte: an interruption is far likelier there than
on a page. The completeness check existed — without it a truncated .part
passed for an image, giving a valid but EMPTY qcow2 — but it threw away the
bytes received and sent the user back to a hand-typed "curl -C -". The
transfer now resumes on the same mirror, three attempts, through a "Range"
asking for the rest; only then does it change mirror. A server ignoring the
Range returns the whole file, and we restart from zero rather than doubling
the bytes already there.
Checked: 5 tests against a server cutting at one third, image reassembled byte
for byte, and the truncated .part goes when the retries run out.

Assisted-by: Claude Opus 5
2026-09-24 13:56:57 -04:00