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
|
downloadconduit req = catchMaybeIO (getFileSize file) >>= \case
|
||||||
Nothing -> runResourceT $ do
|
Nothing -> runResourceT $ do
|
||||||
liftIO $ debugM "url" (show req')
|
liftIO $ debugM "url" (show req')
|
||||||
resp <- http (applyRequest uo req') (httpManager uo)
|
resp <- http req' (httpManager uo)
|
||||||
if responseStatus resp == ok200
|
if responseStatus resp == ok200
|
||||||
then store zeroBytesProcessed WriteMode resp
|
then store zeroBytesProcessed WriteMode resp
|
||||||
else showrespfailure resp
|
else showrespfailure resp
|
||||||
Just sz -> resumeconduit req' sz
|
Just sz -> resumeconduit req' sz
|
||||||
where
|
where
|
||||||
|
req' = applyRequest uo $ req
|
||||||
-- Override http-client's default decompression of gzip
|
-- Override http-client's default decompression of gzip
|
||||||
-- compressed files. We want the unmodified file content.
|
-- compressed files. We want the unmodified file content.
|
||||||
req' = req
|
|
||||||
{ requestHeaders = (hAcceptEncoding, "identity") :
|
{ requestHeaders = (hAcceptEncoding, "identity") :
|
||||||
filter ((/= hAcceptEncoding) . fst)
|
filter ((/= hAcceptEncoding) . fst)
|
||||||
(requestHeaders req)
|
(requestHeaders req)
|
||||||
|
|
Loading…
Reference in a new issue