|
@@ -654,11 +654,11 @@ func deleteImages(srv *Server, version float64, w http.ResponseWriter, r *http.R
|
|
}
|
|
}
|
|
|
|
|
|
func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
|
func postContainersStart(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
|
- hostConfig := &HostConfig{}
|
|
|
|
-
|
|
|
|
|
|
+ var hostConfig *HostConfig
|
|
// allow a nil body for backwards compatibility
|
|
// allow a nil body for backwards compatibility
|
|
if r.Body != nil {
|
|
if r.Body != nil {
|
|
if matchesContentType(r.Header.Get("Content-Type"), "application/json") {
|
|
if matchesContentType(r.Header.Get("Content-Type"), "application/json") {
|
|
|
|
+ hostConfig = &HostConfig{}
|
|
if err := json.NewDecoder(r.Body).Decode(hostConfig); err != nil {
|
|
if err := json.NewDecoder(r.Body).Decode(hostConfig); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|