func newOptions() *options {
	// In this case, use a default http.Client.
	// Ideally we should always use the NewHTTPTLSTransport,
	// however test suites such as JujuConnSuite and some facade
	// tests rely on settings to the http.DefaultTransport for
	// tests to run with different protocol scheme such as "test"
	// and some replace the RoundTripper to answer test scenarios.
	//
	// https://bugs.launchpad.net/juju/+bug/1888888
	defaultCopy := *http.DefaultClient

	return &options{
		disableKeepAlives:        true,
		tlsHandshakeTimeout:      20 * time.Second,
		skipHostnameVerification: false,
		middlewares: []TransportMiddleware{
			DialContextMiddleware(NewLocalDialBreaker(true)),
			FileProtocolMiddleware,
			ProxyMiddleware,
		},
		httpClient: &defaultCopy,
		logger:     loggo.GetLogger("http"),
	}
}
// Create a options instance with default values.
Create a options instance with default values.
// Create a options instance with default values .
func newOptions() *options {
	 https:bugs.launchpad.net/juju/+bug/1888888
	defaultCopy := *http.DefaultClient
	return &options{
		disableKeepAlives:        true,
		tlsHandshakeTimeout:      20 * time.Second,
		skipHostnameVerification: false,
		middlewares: []TransportMiddleware{
			DialContextMiddleware(NewLocalDialBreaker(true)),
			FileProtocolMiddleware,
			ProxyMiddleware,
		},
		httpClient: &defaultCopy,
		logger:     loggo.GetLogger("http"),
	}
}
func newOptions ( ) * options { defaultCopy := * http . DefaultClient return & options { disableKeepAlives : true , tlsHandshakeTimeout : 20 * time . Second , skipHostnameVerification : false , middlewares : [ ] TransportMiddleware { DialContextMiddleware ( NewLocalDialBreaker ( true ) ) , FileProtocolMiddleware , ProxyMiddleware , } , httpClient : & defaultCopy , logger : loggo . GetLogger ( " " ) , } }
Create a options instance with default values.
Create a options instance with default values .
// In this case, use a default http.Client. // Ideally we should always use the NewHTTPTLSTransport, // however test suites such as JujuConnSuite and some facade // tests rely on settings to the http.DefaultTransport for // tests to run with different protocol scheme such as "test" // and some replace the RoundTripper to answer test scenarios. // // https://bugs.launchpad.net/juju/+bug/1888888