From c2b20907d99ddc6af9c519ddfa1dd52cf30925fb Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Thu, 19 Feb 2015 17:14:25 -0800 Subject: [PATCH] A digest missing parameter should result in a bad request Signed-off-by: Stephen J Day --- registry/handlers/layerupload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/handlers/layerupload.go b/registry/handlers/layerupload.go index 63a9e776..3a852043 100644 --- a/registry/handlers/layerupload.go +++ b/registry/handlers/layerupload.go @@ -174,7 +174,7 @@ func (luh *layerUploadHandler) PutLayerUploadComplete(w http.ResponseWriter, r * if dgstStr == "" { // no digest? return error, but allow retry. - w.WriteHeader(http.StatusNotFound) + w.WriteHeader(http.StatusBadRequest) luh.Errors.Push(v2.ErrorCodeDigestInvalid, "digest missing") return }