From 9bd9fee7d69a70fdf4f73405a90077412024ff02 Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Sun, 12 Jul 2015 15:31:59 -0700 Subject: [PATCH] preserve status code from POST /containers/*/exec The docker remote API specifies that a 201 is returned on successful creation of an Exec and a strict client will not accept that being turned into a 200. https://docs.docker.com/reference/api/docker_remote_api_v1.19/#exec-create Resolves #1055 Signed-off-by: Ryan Graham --- api/handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/handlers.go b/api/handlers.go index b45856a90f..1da5ab2eee 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -494,6 +494,7 @@ func postContainersExec(c *context, w http.ResponseWriter, r *http.Request) { container.Info.ExecIDs = append(container.Info.ExecIDs, id.ID) w.Header().Set("Content-Type", "application/json") + w.WriteHeader(resp.StatusCode) w.Write(data) }