If resumable digest support is disabled, detct this when closing the blobwriter
and allow the close to continue. Also update the name of the function. Signed-off-by: Richard Scothern <richard.scothern@docker.com>
This commit is contained in:
parent
1fc752c718
commit
ccfa25cf00
3 changed files with 5 additions and 5 deletions
|
@ -77,7 +77,7 @@ func blobUploadDispatcher(ctx *Context, r *http.Request) http.Handler {
|
|||
|
||||
if size := upload.Size(); size != buh.State.Offset {
|
||||
defer upload.Close()
|
||||
ctxu.GetLogger(ctx).Infof("upload resumed at wrong offest: %d != %d", size, buh.State.Offset)
|
||||
ctxu.GetLogger(ctx).Errorf("upload resumed at wrong offest: %d != %d", size, buh.State.Offset)
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
buh.Errors = append(buh.Errors, v2.ErrorCodeBlobUploadInvalid.WithDetail(err))
|
||||
upload.Cancel(buh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue