Skip to content

Commit

Permalink
registry/handlers revert get status
Browse files Browse the repository at this point in the history
  • Loading branch information
dhij committed Aug 17, 2023
1 parent 3f8ce75 commit a72895a
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions registry/handlers/blobupload.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func blobUploadDispatcher(ctx *Context, r *http.Request) http.Handler {
}

if buh.UUID != "" {
if r.Method == http.MethodGet || r.Method == http.MethodHead {
return handler
}
if h := buh.ResumeBlobUpload(ctx, r); h != nil {
return h
}
Expand Down Expand Up @@ -110,18 +107,8 @@ func (buh *blobUploadHandler) StartBlobUpload(w http.ResponseWriter, r *http.Req
// GetUploadStatus returns the status of a given upload, identified by id.
func (buh *blobUploadHandler) GetUploadStatus(w http.ResponseWriter, r *http.Request) {
if buh.Upload == nil {
blobs := buh.Repository.Blobs(buh)
upload, err := blobs.Resume(buh, buh.UUID)
if err != nil {
if err == distribution.ErrBlobUploadUnknown {
buh.Errors = append(buh.Errors, v2.ErrorCodeBlobUploadUnknown.WithDetail(err))
} else {
buh.Errors = append(buh.Errors, errcode.ErrorCodeUnknown.WithDetail(err))
}
return
}

buh.Upload = upload
buh.Errors = append(buh.Errors, v2.ErrorCodeBlobUploadUnknown)
return
}

if err := buh.blobUploadResponse(w, r); err != nil {
Expand Down Expand Up @@ -200,7 +187,6 @@ func (buh *blobUploadHandler) PutBlobUploadComplete(w http.ResponseWriter, r *ht
buh.Errors = append(buh.Errors, v2.ErrorCodeBlobUploadUnknown)
return
}
defer buh.Upload.Close()

dgstStr := r.FormValue("digest") // TODO(stevvooe): Support multiple digest parameters!

Expand Down

0 comments on commit a72895a

Please sign in to comment.