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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
521e27f4ac
Коммит
3461a7b207
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user