ecfcb41abe
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. |
||
---|---|---|
.. | ||
Base64.hs | ||
CopyFile.hs | ||
DataUnits.hs | ||
Directory.hs | ||
Dot.hs | ||
Exception.hs | ||
FileMode.hs | ||
Format.hs | ||
Gpg.hs | ||
JSONStream.hs | ||
Matcher.hs | ||
Misc.hs | ||
Monad.hs | ||
PartialPrelude.hs | ||
Path.hs | ||
RsyncFile.hs | ||
SafeCommand.hs | ||
State.hs | ||
StatFS.hsc | ||
TempFile.hs | ||
Touch.hsc | ||
Url.hs |