client rebuilding in progress
This commit is contained in:
+5
-1
@@ -15,6 +15,7 @@
|
||||
package transport
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -75,7 +76,10 @@ func pingSingle(ctx context.Context, reg name.Registry, t http.RoundTripper, sch
|
||||
resp.Body.Close()
|
||||
}()
|
||||
|
||||
insecure := scheme == "http"
|
||||
// If resp.Request is set, we may have followed a redirect,
|
||||
// so we want to prefer resp.Request.URL.Scheme (if it's set)
|
||||
// falling back to the original request's scheme.
|
||||
insecure := cmp.Or(resp.Request, req).URL.Scheme == "http"
|
||||
|
||||
switch resp.StatusCode {
|
||||
case http.StatusOK:
|
||||
|
||||
Reference in New Issue
Block a user