fix User-Agent reversion
Send User-Agent and any configured annex.http-headers when downloading with http, fixes reversion introduced when switching to http-client. This commit was sponsored by mo on Patreon.
This commit is contained in:
parent
bd6799ebef
commit
50609da787
4 changed files with 16 additions and 1 deletions
|
@ -17,6 +17,8 @@ git-annex (6.20180627) UNRELEASED; urgency=medium
|
|||
in a directory owned by root. Note that this prevents using the
|
||||
standalone bundle in environments where HOME is not writable.
|
||||
* unused --from: Allow specifiying a repository by uuid or description.
|
||||
* Send User-Agent and any configured annex.http-headers when downloading
|
||||
with http, fixes reversion introduced when switching to http-client.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Fri, 22 Jun 2018 10:36:22 -0400
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ download meterupdate url file uo =
|
|||
|
||||
downloadconduit req = catchMaybeIO (getFileSize file) >>= \case
|
||||
Nothing -> runResourceT $ do
|
||||
resp <- http req' (httpManager uo)
|
||||
resp <- http (applyRequest uo req') (httpManager uo)
|
||||
if responseStatus resp == ok200
|
||||
then store zeroBytesProcessed WriteMode resp
|
||||
else showrespfailure resp
|
||||
|
|
|
@ -224,3 +224,5 @@ Note that the only addition was adding a `User-Agent:` header (copied from the `
|
|||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||
|
||||
Absolutely :-) `git annex` has been my podcatcher, and media management tool for years. Thanks for writing it!
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 2"""
|
||||
date="2018-07-16T15:48:08Z"
|
||||
content="""
|
||||
Hmm, it should be sending a user agent.
|
||||
|
||||
Wow, it's not sending a user agent!!!
|
||||
|
||||
Thank you very much for noticing this glaring omission.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue