manifoldco / go-manifold

Go client API for Manifold (unstable)
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Manifold: fix User-Agent with multiple calls. #39

Closed jelmersnoeck closed 6 years ago

jelmersnoeck commented 6 years ago

By not re-assigning the agent value, the original value gets overwritten if it is not empty. This means that for multiple calls with the same client, we'll end up with a chain of duplicated UserAgent strings.

To prevent this, we'll re-assign the value within the RoundTrip function so it always starts with a "clean" value.

fixes https://github.com/manifoldco/go-manifold/issues/38