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.
This commit is contained in:
parent
b90b9b936d
commit
728afbc4b1
1 changed files with 1 additions and 1 deletions
|
@ -495,7 +495,7 @@ downloadConduit meterupdate req file uo =
|
||||||
-- when supported by the http server. The server may also opt to
|
-- when supported by the http server. The server may also opt to
|
||||||
-- send the whole file rather than resuming.
|
-- send the whole file rather than resuming.
|
||||||
resumedownload sz = join $ runResourceT $ do
|
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'')
|
liftIO $ debugM "url" (show req'')
|
||||||
resp <- http req'' (httpManager uo)
|
resp <- http req'' (httpManager uo)
|
||||||
if responseStatus resp == partialContent206
|
if responseStatus resp == partialContent206
|
||||||
|
|
Loading…
Reference in a new issue