]> dgit.raspbian.org Git - git-annex.git/commitdiff
preserve other headers when adding resume header
authorJoey Hess <joeyh@joeyh.name>
Thu, 19 Nov 2020 18:41:33 +0000 (14:41 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 19 Nov 2020 18:45:22 +0000 (14:45 -0400)
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

index 7ef821ca056508c2b6e9879b7ddc0e48d93fcabf..b8a1735630082f5c7b9d24392b2ab4158020a8ef 100644 (file)
@@ -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