debug the full adjusted Request
So that the user-agent etc are included in the debug.
This commit is contained in:
parent
4b793fb077
commit
45e09ea7f3
1 changed files with 4 additions and 4 deletions
|
@ -328,15 +328,15 @@ download' noerror meterupdate url file uo =
|
|||
downloadconduit req = catchMaybeIO (getFileSize file) >>= \case
|
||||
Nothing -> runResourceT $ do
|
||||
liftIO $ debugM "url" (show req')
|
||||
resp <- http (applyRequest uo req') (httpManager uo)
|
||||
resp <- http req' (httpManager uo)
|
||||
if responseStatus resp == ok200
|
||||
then store zeroBytesProcessed WriteMode resp
|
||||
else showrespfailure resp
|
||||
Just sz -> resumeconduit req' sz
|
||||
where
|
||||
req' = applyRequest uo $ req
|
||||
-- Override http-client's default decompression of gzip
|
||||
-- compressed files. We want the unmodified file content.
|
||||
req' = req
|
||||
{ requestHeaders = (hAcceptEncoding, "identity") :
|
||||
filter ((/= hAcceptEncoding) . fst)
|
||||
(requestHeaders req)
|
||||
|
|
Loading…
Reference in a new issue