mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01:00
Merge pull request #191 from stevvooe/missing-digest-bad-request
A digest missing parameter should result in a bad request
This commit is contained in:
commit
c3536ea1c5
@ -174,7 +174,7 @@ func (luh *layerUploadHandler) PutLayerUploadComplete(w http.ResponseWriter, r *
|
|||||||
|
|
||||||
if dgstStr == "" {
|
if dgstStr == "" {
|
||||||
// no digest? return error, but allow retry.
|
// no digest? return error, but allow retry.
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
luh.Errors.Push(v2.ErrorCodeDigestInvalid, "digest missing")
|
luh.Errors.Push(v2.ErrorCodeDigestInvalid, "digest missing")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user