From 606c5c8c5785d758e7984e69cda0eb4c5fd26fcd 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 --- docs/handlers/layerupload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/handlers/layerupload.go b/docs/handlers/layerupload.go index 63a9e776..3a852043 100644 --- a/docs/handlers/layerupload.go +++ b/docs/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 }