Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Custom Redirect being used regardless if followRedirect is false
In net/http, when defining a redirect function whether to follow or disable redirects, you must always define a custom function in the transport. Using the custom redirect func in the clientConfig, it causes the .SetFollowRedirect() function to never work if provided with "false". By adding a check to ensure that follow redirects is enabled when updating the underlying client's transport, it allows you to enable and disable redirects per request, while also maintaining the custom redirect function when re-enabling follow redirects.
- Loading branch information