git-annex/Remote/WebDAV
Joey Hess 8fd9b67ed8
factor out extendUrlWithPath and use for git http remote key urls
Fixes retrieval from http git remotes of keys with '%' in their names.
Concacenating the path to the annex object for such a key with a valid url
produces an invalid url.

There were already 2 other implementations of the same function,
both different. This unifies it into a single function.

Some implementations of the function used isUnescapedInURI, and others
isUnescapedInURIComponent with a special case to not escape '/'. Which is
right? Well, isUnescapedInURI also does not escape characters in ":?#[]@".
And parseUrl "http://example.com/foo[" = Nothing. parseURIRelaxed
does handle that special case. But, extendUrlWithPath is not necessarily
used with parseURIRelaxed, and it's better if it guarantee a parseable url.
So, it uses isUnescapedInURIComponent with the '/' special case.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2026-02-16 14:04:53 -04:00
..
DavLocation.hs factor out extendUrlWithPath and use for git http remote key urls 2026-02-16 14:04:53 -04:00