Properly handle authentication for 302 redirect URLs (#12920)
uv was failing to authenticate on 302 redirects when credentials were available. This was because it was relying on `reqwest_middleware`'s default redirect behavior which bypasses the middleware pipeline when trying the redirect request (and hence bypasses our authentication middleware). This PR updates uv to retrigger the middleware pipeline when handling a 302 redirect, correctly using credentials from the URL, the keyring, or `.netrc`. Closes #5595 Closes #11097
This commit is contained in:
@@ -52,7 +52,7 @@ impl GitResolver {
|
||||
pub async fn github_fast_path(
|
||||
&self,
|
||||
url: &GitUrl,
|
||||
client: ClientWithMiddleware,
|
||||
client: &ClientWithMiddleware,
|
||||
) -> Result<Option<GitOid>, GitResolverError> {
|
||||
let reference = RepositoryReference::from(url);
|
||||
|
||||
@@ -112,7 +112,7 @@ impl GitResolver {
|
||||
pub async fn fetch(
|
||||
&self,
|
||||
url: &GitUrl,
|
||||
client: ClientWithMiddleware,
|
||||
client: impl Into<ClientWithMiddleware>,
|
||||
disable_ssl: bool,
|
||||
offline: bool,
|
||||
cache: PathBuf,
|
||||
|
||||
Reference in New Issue
Block a user