On my opinion this "hook" is making harder to read the send_request_cgi method which is being overloaded with responsibilities:

* the old send_request_cgi task
* check if HttpClient needs to follow redirects
* check response code and location if it's a redirect
* execute the redirection taking into account the max redirection depth

I think it would benefit from refactoring.