Merge lp:~wallyworld/goose/better-http-transport-fix into lp:goose
Proposed by
Ian Booth
Status: | Merged |
---|---|
Approved by: | Ian Booth |
Approved revision: | 109 |
Merged at revision: | 109 |
Proposed branch: | lp:~wallyworld/goose/better-http-transport-fix |
Merge into: | lp:goose |
Diff against target: |
18 lines (+4/-3) 1 file modified
http/client.go (+4/-3) |
To merge this branch: | bzr merge lp:~wallyworld/goose/better-http-transport-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+191740@code.launchpad.net |
Commit message
Do not overwrite http.Client's transport
Ensure that http.Client's transport has DisableKeepAliv
without ovwrwriting the transport itself.
Description of the change
Do not overwrite http.Client's transport
Ensure that http.Client's transport has DisableKeepAliv
without ovwrwriting the transport itself.
To post a comment you must log in.
Reviewers: mp+191740_ code.launchpad. net,
Message:
Please take a look.
Description:
Do not overwrite http.Client's transport
Ensure that http.Client's transport has DisableKeepAliv es=true
without ovwrwriting the transport itself.
https:/ /code.launchpad .net/~wallyworl d/goose/ better- http-transport- fix/+merge/ 191740
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14840043/
Affected files (+6, -3 lines):
A [revision details]
M http/client.go
Index: [revision details] 20131017231035- 89gpy8n7g2t928g 8
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: http/client.go /code.google. com/p/go/ issues/ detail? id=4677 nsport = &http.Transport{ nvironment, ent.Transport (*http. Transport) ; ok { DisableKeepAliv es = true nsport. (*http. Transport) .DisableKeepAli ves = true
=== modified file 'http/client.go'
--- http/client.go 2013-10-17 23:05:55 +0000
+++ http/client.go 2013-10-18 01:52:13 +0000
@@ -29,10 +29,11 @@
// See https:/
// We need to force the connection to close each time so that we don't
// hit the above Go bug.
- http.DefaultTra
- Proxy: http.ProxyFromE
- DisableKeepAlives: true,
+ roundTripper := http.DefaultCli
+ if transport, ok := roundTripper.
+ transport.
}
+ http.DefaultTra
}
type Client struct {