diff --git a/api/server/router/container/container_routes.go b/api/server/router/container/container_routes.go index cc8ac09973..3f216ace91 100644 --- a/api/server/router/container/container_routes.go +++ b/api/server/router/container/container_routes.go @@ -225,12 +225,7 @@ func (s *containerRouter) postContainersStop(ctx context.Context, w http.Respons version = httputils.VersionFromContext(ctx) ) if versions.GreaterThanOrEqualTo(version, "1.42") { - if sig := r.Form.Get("signal"); sig != "" { - if _, err := signal.ParseSignal(sig); err != nil { - return errdefs.InvalidParameter(err) - } - options.Signal = sig - } + options.Signal = r.Form.Get("signal") } if tmpSeconds := r.Form.Get("t"); tmpSeconds != "" { valSeconds, err := strconv.Atoi(tmpSeconds) @@ -283,12 +278,7 @@ func (s *containerRouter) postContainersRestart(ctx context.Context, w http.Resp version = httputils.VersionFromContext(ctx) ) if versions.GreaterThanOrEqualTo(version, "1.42") { - if sig := r.Form.Get("signal"); sig != "" { - if _, err := signal.ParseSignal(sig); err != nil { - return errdefs.InvalidParameter(err) - } - options.Signal = sig - } + options.Signal = r.Form.Get("signal") } if tmpSeconds := r.Form.Get("t"); tmpSeconds != "" { valSeconds, err := strconv.Atoi(tmpSeconds)