-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exotic http lib leak not handled by goth #65
Comments
Please submit a PR, I'd happily merge it. |
@rgeronimi It is not fixed for all the providers. We still have same issue in dropbox, box, digital ocean, lastfm, linkedin, salesforce, spotify, twitch, twitter and yammer providers. |
Ah thanks, I hacked a simple shell script to search for such errors in my dependencies, and I missed the http Do pattern. |
@rgeronimi can you please close this. |
The http lib has an exotic case of connection leak which is not taken care of by goth :
if for some reasons (e.g., ongoing production incident) the target authentication URL is redirecting too many times, the golang http client might return a non-nil response object together with a non-nil error.
This is an under-documented weakness of the Golang version 1 libraries, left for compatibility reasons, causing connection leak in many projects.
Consequently, when checking for an http client error, the goth code should also check if the response is non-nil, and if non-nil close its body.
The text was updated successfully, but these errors were encountered: