return new HTTP clients rather than aliasing http.DefaultClient #148

Merged
merged 1 commit into from Sep 2, 2015

Conversation

Projects
None yet
2 participants
Owner

rogpeppe commented Sep 2, 2015

This makes the Get*HTTPClient functions return a new client
each time they are called, implementing the semantics described in the
doc comments.

This fixes bugs where callers were setting fields in the returned
clients and unintentionally setting http.DefaultClient attributes
as a result and hence breaking test isolation.

(Review request: http://reviews.vapour.ws/r/2569/)

Owner

rogpeppe commented Sep 2, 2015

$$merge$$

Contributor

jujubot commented Sep 2, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils

jujubot added a commit that referenced this pull request Sep 2, 2015

Merge pull request #148 from rogpeppe/master
return new HTTP clients rather than aliasing http.DefaultClient

This makes the Get*HTTPClient functions return a new client
each time they are called, implementing the semantics described in the
doc comments.

This fixes bugs where callers were setting fields in the returned
clients and unintentionally setting http.DefaultClient attributes
as a result and hence breaking test isolation.


(Review request: http://reviews.vapour.ws/r/2569/)

@jujubot jujubot merged commit c9d1b9e into juju:master Sep 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment