mreiferson/go-httpclient — pull request #5 by mynameisfiber (2013-01-02 22:25:57+00:00)
Title: Removing hc_ references in client code

httpclient has been cleaned up so that the user never sees any
references to 'hc_http(s)?' when they get their request back OR inside
their redirect policy (in response to issue #4).

Fixing the issue for the response's `resp.Request.URL` object was
straightforward (we simply remove it in `httpclient.Do`), however
removing it from the redirect chain required some h4x0ring.

In order to do this, we first clean up the new redirect to be considered
and the newest entry in the array of previous requests. After
consulting the user defined RedirectPolicy, we reinstate the 'hc_'
prefix to the current request (or else our custom RoundTripper doesn't
get triggered). Is there a better way?!