Allowing resize tty to only work when container is started

Addresses #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 78a272ce14a43f81a79f1b948d5cfd120405f8c9
Component: engine
This commit is contained in:
Srini Brahmaroutu
2014-10-23 20:30:18 +00:00
parent eb59f56bfa
commit d9b4e1dcc3
3 changed files with 58 additions and 1 deletions

View File

@ -254,7 +254,8 @@ func sockRequest(method, endpoint string) ([]byte, error) {
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("received status != 200 OK: %s", resp.Status)
body, _ := ioutil.ReadAll(resp.Body)
return body, fmt.Errorf("received status != 200 OK: %s", resp.Status)
}
return ioutil.ReadAll(resp.Body)