~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/utils/http.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
var insecureClientMutex = sync.Mutex{}
18
18
 
19
19
func init() {
20
 
        // See https://code.google.com/p/go/issues/detail?id=4677
21
 
        // We need to force the connection to close each time so that we don't
22
 
        // hit the above Go bug.
23
20
        defaultTransport := http.DefaultTransport.(*http.Transport)
24
 
        defaultTransport.DisableKeepAlives = true
25
21
        installHTTPDialShim(defaultTransport)
26
22
        registerFileProtocol(defaultTransport)
27
23
}