-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cabal-install: update curl transport to support Basic authentication #10089
cabal-install: update curl transport to support Basic authentication #10089
Conversation
6f13072
to
9693c34
Compare
I don't think we can merge it into 3.12. Please, target |
9693c34
to
5fc9672
Compare
@frasertweedale I rebased your PR on top of master. I hope it's ok. |
@andreabedini that's fine. Note that we do want to backport this change for maintenance releases on older branches (you know the reasons). If you prefer a variant of the patch for backports with the minimal changes and without the refactors, I can prepare that. Or else, I suppose it lands in master first and then the backports can be created (is there automation for that?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good afaics
Please, disregard my previous message, I was wrong about the branch. Let me put a label on this so that it gets merged. |
Extract a bunch of string equality checks for the URI scheme to top-level functions.
"They're the same picture". Thus, refactor the *transport supports https* checks.
Allow the curl transport to use Basic authentication, if and only if the url scheme is HTTPS (i.e. TLS will be used). Retain the existing behaviour (force Digest scheme) for insecure requests. This change is required to support upcoming hackage-server changes. The wget transport already supports Basic authentication.
36faf8b
to
6364221
Compare
…askell#10089) * cabal-install: extract url scheme checks Extract a bunch of string equality checks for the URI scheme to top-level functions. * cabal-install: refactor and document transport checks "They're the same picture". Thus, refactor the *transport supports https* checks. * cabal-install: allow Basic authentication in curl transport Allow the curl transport to use Basic authentication, if and only if the url scheme is HTTPS (i.e. TLS will be used). Retain the existing behaviour (force Digest scheme) for insecure requests. This change is required to support upcoming hackage-server changes. The wget transport already supports Basic authentication. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…askell#10089) * cabal-install: extract url scheme checks Extract a bunch of string equality checks for the URI scheme to top-level functions. * cabal-install: refactor and document transport checks "They're the same picture". Thus, refactor the *transport supports https* checks. * cabal-install: allow Basic authentication in curl transport Allow the curl transport to use Basic authentication, if and only if the url scheme is HTTPS (i.e. TLS will be used). Retain the existing behaviour (force Digest scheme) for insecure requests. This change is required to support upcoming hackage-server changes. The wget transport already supports Basic authentication. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This PR updates the curl transport to support HTTP Basic authentication scheme. There are a
couple of preliminary small refactors. Best review the commits independently and in order.
Targeting branch
3.12
because I couldn't buildmaster
(GHC panic, don't worry about it).It rebases cleanly onto
master
.QA Notes
Ensure that authenticated operations using username and password against
hackage.haskell.org
succeed, when using the Curl transport.Checklist