Close HTTP response bodies properly in golang driver (and some api functions) (#3217)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
848a8663ed
Коммит
0788e83647
@@ -203,6 +203,7 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
handleResponse(c, w, response, channelId, cmd, false)
|
||||
}
|
||||
} else {
|
||||
defer resp.Body.Close()
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
c.Err = model.NewLocAppError("command", "api.command.execute_command.failed_resp.app_error", map[string]interface{}{"Trigger": trigger, "Status": resp.Status}, string(body))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user