From 1f06e4f816404b0c702d8b6296ca91e98f738304 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 3 Feb 2015 18:27:40 -0800 Subject: [PATCH] Manifest PUT should return 202 Accepted status Signed-off-by: Stephen J Day --- docs/api_test.go | 3 +-- docs/images.go | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/api_test.go b/docs/api_test.go index 5f9e6c38..aa70e504 100644 --- a/docs/api_test.go +++ b/docs/api_test.go @@ -336,8 +336,7 @@ func TestManifestAPI(t *testing.T) { } resp = putManifest(t, "putting signed manifest", manifestURL, signedManifest) - - checkResponse(t, "putting signed manifest", resp, http.StatusOK) + checkResponse(t, "putting signed manifest", resp, http.StatusAccepted) resp, err = http.Get(manifestURL) if err != nil { diff --git a/docs/images.go b/docs/images.go index 3d6feeed..db6bd705 100644 --- a/docs/images.go +++ b/docs/images.go @@ -92,6 +92,8 @@ func (imh *imageManifestHandler) PutImageManifest(w http.ResponseWriter, r *http w.WriteHeader(http.StatusBadRequest) return } + + w.WriteHeader(http.StatusAccepted) } // DeleteImageManifest removes the image with the given tag from the registry.