зеркало из https://github.com/microsoft/docker.git
Add check that the request is good
This commit is contained in:
Родитель
99c27fa0dd
Коммит
e4752c8c1a
|
@ -736,6 +736,9 @@ func GetReleaseVersion() string {
|
|||
return ""
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.ContentLength > 24 || resp.StatusCode != 200 {
|
||||
return ""
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return ""
|
||||
|
|
Загрузка…
Ссылка в новой задаче