From 728afbc4b1ca49940c52a151f1112d83c893d947 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Nov 2020 14:41:33 -0400 Subject: [PATCH] preserve other headers when adding resume header It had lost the hAcceptEncoding header that is set as part of the overriding of http-client's default decompression of compressed files. Seems likely that would have caused resuming of compressed files to fail in some cases. This commit was sponsored by Brett Eisenberg on Patreon. --- Utility/Url.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utility/Url.hs b/Utility/Url.hs index 7ef821ca05..b8a1735630 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -495,7 +495,7 @@ downloadConduit meterupdate req file uo = -- when supported by the http server. The server may also opt to -- send the whole file rather than resuming. resumedownload sz = join $ runResourceT $ do - let req'' = req' { requestHeaders = resumeFromHeader sz : requestHeaders req } + let req'' = req' { requestHeaders = resumeFromHeader sz : requestHeaders req' } liftIO $ debugM "url" (show req'') resp <- http req'' (httpManager uo) if responseStatus resp == partialContent206