Compare commits

..

No commits in common. "e51550aedc02f1ad6038678fba5b8c4dcc753bad" and "97f68a85e9cff9197697600edb64d0cc6f948b70" have entirely different histories.

View file

@ -309,15 +309,12 @@ module Make
(* XXX: we may be in trouble if different hash functions are used for the same archive *)
let ( >>>= ) = Lwt_result.bind in
fun response r data ->
if Http_mirage_client.Status.is_successful response.Http_mirage_client.status then
Lwt.return r >>>= fun (digests, swap) ->
let digests = Archive_checksum.update_digests digests data in
active_add_bytes url (String.length data);
Swap.append swap data >|= function
| Ok () -> Ok (digests, swap)
| Error swap_err -> Error (`Swap swap_err)
else
Lwt.return (Error `Bad_response)
Lwt.return r >>>= fun (digests, swap) ->
let digests = Archive_checksum.update_digests digests data in
active_add_bytes url (String.length data);
Swap.append swap data >|= function
| Ok () -> Ok (digests, swap)
| Error swap_err -> Error (`Swap swap_err)
let check_csums_digests csums digests =
let csums' = Archive_checksum.digests_to_hm digests in
@ -667,7 +664,7 @@ stamp: %S
(SM.cardinal disk.Disk.md5s)
(KV.free disk.Disk.dev)
in
let sort_by_ts a b = Ptime.compare b a in
let sort_by_ts a b = Ptime.compare a b in
let active_downloads =
let header = "<h2>Active downloads</h2><ul>" in
let content =