mirror of https://github.com/docker/docs.git
Merge pull request #1078 from kstaken/fix_json_error
* Remote API: Small fix in /start if empty host config
This commit is contained in:
commit
d1d66b9c5f
6
api.go
6
api.go
|
@ -555,8 +555,10 @@ func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r
|
||||||
|
|
||||||
// allow a nil body for backwards compatibility
|
// allow a nil body for backwards compatibility
|
||||||
if r.Body != nil {
|
if r.Body != nil {
|
||||||
if err := json.NewDecoder(r.Body).Decode(hostConfig); err != nil {
|
if r.Header.Get("Content-Type") == "application/json" {
|
||||||
return err
|
if err := json.NewDecoder(r.Body).Decode(hostConfig); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue