summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-10-12 08:00:53 -0700
committerGitHub <noreply@github.com>2017-10-12 08:00:53 -0700
commit3461a7b20704464ee3c19a3dd31805e4c5c1fc4f (patch)
treeb14ad4935a9453157024e638b5c468a1833e0eae /app/oauth.go
parent521e27f4ace125b47879b38edbad07d7c21a54e6 (diff)
downloadchat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.tar.gz
chat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.tar.bz2
chat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.zip
Add back consumeAndClose functionality. (#7608)
* consume bodies for action button integrations, webrtc gateway, oauth endpoint * Fixing a couple more places, switching to io.Copy to ioutil.Discard, adding a comment to help prevent future performance regressions
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 909d16628..5a02f6238 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -685,7 +685,7 @@ func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service
return nil, "", stateProps, model.NewAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.token_failed.app_error", nil, err.Error(), http.StatusInternalServerError)
} else {
ar = model.AccessResponseFromJson(resp.Body)
- resp.Body.Close()
+ consumeAndClose(resp)
if ar == nil {
return nil, "", stateProps, model.NewAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.bad_response.app_error", nil, "response_body="+string(bodyBytes), http.StatusInternalServerError)