Change the logic for automatically upgrading to HTTPS
The initial patch would always try to use HTTPS, even when the repo specified to use HTTP. This works for the central community hackage but obviously does not work in general. The new logic is that we always follow what is specified for the remote repo in the config, except for built-in known repos (currently just the central community hackage) where we mark them as also supporting https. For upload when uploading to such a marked repo then we will try https and will complain if the plain-http impl was selected automatically (but it's ok if selected manually). This patch also changes things so that for http urls on download, we stick to the builtin http impl by default, and only use the external ones if https support is required (i.e. because the repo was configured to use an https url)
Showing
- cabal-install/Distribution/Client/Config.hs 4 additions, 2 deletionscabal-install/Distribution/Client/Config.hs
- cabal-install/Distribution/Client/FetchUtils.hs 8 additions, 4 deletionscabal-install/Distribution/Client/FetchUtils.hs
- cabal-install/Distribution/Client/HttpUtils.hs 118 additions, 49 deletionscabal-install/Distribution/Client/HttpUtils.hs
- cabal-install/Distribution/Client/Setup.hs 8 additions, 7 deletionscabal-install/Distribution/Client/Setup.hs
- cabal-install/Distribution/Client/Types.hs 10 additions, 2 deletionscabal-install/Distribution/Client/Types.hs
- cabal-install/Distribution/Client/Upload.hs 22 additions, 14 deletionscabal-install/Distribution/Client/Upload.hs
Loading
Please register or sign in to comment