mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-20 03:58:32 -04:00
Fix http basic auth if protocol is missing (#22)
Basic auth only worked if a full url was supplied. The reason is that BasicTransport.RoundTrip checked if the resulting request URL has a the transport's URL as a prefix. This is fixed by setting the transport's URL to the canonical URL that is computed a few lines earlier.
This commit is contained in:
parent
f87e406a2e
commit
11a291f744
|
@ -68,7 +68,7 @@ func newFromTransport(auth types.AuthConfig, transport http.RoundTripper, debug
|
|||
}
|
||||
basicAuthTransport := &BasicTransport{
|
||||
Transport: tokenTransport,
|
||||
URL: auth.ServerAddress,
|
||||
URL: url,
|
||||
Username: auth.Username,
|
||||
Password: auth.Password,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue