MM-13606 Remove consumeAndClose and clean up integration response handling (#10066)
* MM-13606 Remove consumeAndClose * Allow overriding HTTPService's request timeout * MM-13606 Clean up integration response handling * Properly close httptest servers * Address feedback * Only call buf.Bytes when necessary * Properly check for errors in doOutgoingWebhookRequest * Add comment explaining ignored ioutil.ReadAll errors
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e67fe4c89d
Коммит
1a3ccaf305
@@ -20,7 +20,7 @@ func (a *App) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph {
|
||||
mlog.Error("GetOpenGraphMetadata request failed", mlog.String("requestURL", requestURL), mlog.Any("err", err))
|
||||
return nil
|
||||
}
|
||||
defer consumeAndClose(res)
|
||||
defer res.Body.Close()
|
||||
|
||||
return a.ParseOpenGraphMetadata(requestURL, res.Body, res.Header.Get("Content-Type"))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user