diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index cc0910eab..fb5ec3f25 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -1210,7 +1210,7 @@ func (api objectAPIHandlers) HeadBucketHandler(w http.ResponseWriter, r *http.Re return } - writeSuccessResponseHeadersOnly(w) + writeResponse(w, http.StatusOK, nil, mimeXML) } // DeleteBucketHandler - Delete bucket diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index 47855dffd..eb8a2b3ef 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -1131,7 +1131,9 @@ func (z *erasureServerPools) ListObjects(ctx context.Context, bucket, prefix, ma } merged, err := z.listPath(ctx, &opts) if err != nil && err != io.EOF { - logger.LogIf(ctx, err) + if !isErrBucketNotFound(err) { + logger.LogIf(ctx, err) + } return loi, err } diff --git a/cmd/metacache-entries.go b/cmd/metacache-entries.go index a9ae288fc..1cba84526 100644 --- a/cmd/metacache-entries.go +++ b/cmd/metacache-entries.go @@ -307,7 +307,7 @@ func (m metaCacheEntries) resolve(r *metadataResolutionParams) (selected *metaCa // shallow decode. xl, err := entry.xlmeta() if err != nil { - logger.LogIf(context.Background(), err) + logger.LogIf(GlobalContext, err) continue } objsValid++ @@ -339,11 +339,17 @@ func (m metaCacheEntries) resolve(r *metadataResolutionParams) (selected *metaCa if objsValid < r.objQuorum { return nil, false } + // If all objects agree. if selected != nil && objsAgree == objsValid { return selected, true } + // If cached is nil we shall skip the entry. + if selected.cached == nil { + return nil, false + } + // Merge if we have disagreement. // Create a new merged result. selected = &metaCacheEntry{