git-annex/Utility
Joey Hess ecfcb41abe work around Network.Browser bug that converts a HEAD to a GET when following a redirect
The code explicitly switches from HEAD to GET for most redirects.
Possibly because someone misread a spec (which does require switching from
POST to GET for 303 redirects). Or possibly because the spec really is that
bad. Upstream bug: https://github.com/haskell/HTTP/issues/24

Since we absolutely don't want to download entire (large) files from
the web when checking that they exist with HEAD, I wrote my own redirect
follower, based closely on the one used by Network.Browser, but without
this misfeature.

Note that Network.Browser checks that the redirect url is a http url
and fails if not. I don't, because I want to not need to change this
code when it gets https support (related: I'm surprised to see it
doesn't support https yet..). The check does not seem security significant;
it doesn't support file:// urls for example. If a http url is redirected
to https, the Network.Browser will actually make a http connection again.
This could loop, but only up to 5 times.
2012-02-10 21:54:25 -04:00
..
Base64.hs rename 2011-07-05 20:24:10 -04:00
CopyFile.hs remove Utility.Conditional and use IfElse 2012-01-24 16:22:07 -04:00
DataUnits.hs hslint 2011-12-09 01:57:13 -04:00
Directory.hs IO exception rework 2012-02-03 16:47:24 -04:00
Dot.hs finished hlint pass 2011-07-15 12:47:14 -04:00
Exception.hs IO exception rework 2012-02-03 16:47:24 -04:00
FileMode.hs make unused check branches and tags too 2011-09-28 16:43:10 -04:00
Format.hs rename readMaybe to readish 2012-01-23 17:00:10 -04:00
Gpg.hs don't use GPG_AGENT_INFO to force batch mode in test suite 2012-01-09 18:19:29 -04:00
JSONStream.hs go go gadget hlint 2011-09-20 23:24:48 -04:00
Matcher.hs go go gadget hlint 2011-09-20 23:24:48 -04:00
Misc.hs Merge branch 'master' into ghc7.4 2012-02-03 16:48:40 -04:00
Monad.hs treak 2012-01-21 02:49:32 -04:00
PartialPrelude.hs rename readMaybe to readish 2012-01-23 17:00:10 -04:00
Path.hs a few things available elsewhere... 2012-01-23 16:57:45 -04:00
RsyncFile.hs Avoid excessive escaping for rsync special remotes that are not accessed over ssh. 2011-11-18 12:53:48 -04:00
SafeCommand.hs add safeSystem 2011-11-09 17:28:35 -04:00
State.hs switch to the strict state monad 2012-01-29 22:55:06 -04:00
StatFS.hsc really fix foreign C functions filename encodings 2012-02-04 14:30:28 -04:00
TempFile.hs IO exception rework 2012-02-03 16:47:24 -04:00
Touch.hsc really fix foreign C functions filename encodings 2012-02-04 14:30:28 -04:00
Url.hs work around Network.Browser bug that converts a HEAD to a GET when following a redirect 2012-02-10 21:54:25 -04:00