go/src/cmd/go/internal/web/http.go

var impatientInsecureHTTPClient

var securityPreservingDefaultClient

// securityPreservingHTTPClient returns a client that is like the original
// but rejects redirects to plain-HTTP URLs if the original URL was secure.
func securityPreservingHTTPClient(original *http.Client) *http.Client {}

func checkRedirect(req *http.Request, via []*http.Request) error {}

type Interceptor

func EnableTestHooks(interceptors []Interceptor) error {}

func DisableTestHooks() {}

var enableTestHooks

var testInterceptors

func interceptURL(u *urlpkg.URL) (*Interceptor, bool) {}

func interceptRequest(req *http.Request) {}

func get(security SecurityMode, url *urlpkg.URL) (*Response, error) {}

func getFile(u *urlpkg.URL) (*Response, error) {}

func openBrowser(url string) bool {}

func isLocalHost(u *urlpkg.URL) bool {}

type hookCloser

func (c hookCloser) Close() error {}