Skip to content

Commit

Permalink
Merge branch 'master' into resolve_localhost_reverse_proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
allanrogerr committed Apr 9, 2024
2 parents 12ce2aa + a481825 commit 9ab6f18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/object-handlers-common.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func checkPreconditionsPUT(ctx context.Context, w http.ResponseWriter, r *http.R
if isETagEqual(objInfo.ETag, ifNoneMatchETagHeader) {
// If the object ETag matches with the specified ETag.
writeHeaders()
w.WriteHeader(http.StatusNotModified)
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPreconditionFailed), r.URL)
return true
}
}
Expand Down
11 changes: 7 additions & 4 deletions cmd/s3-zip-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import (
"context"
"errors"
"io"
"mime"
"net/http"
"path/filepath"
"sort"
"strings"

Expand Down Expand Up @@ -166,10 +168,11 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,

// New object info
fileObjInfo := ObjectInfo{
Bucket: bucket,
Name: object,
Size: int64(file.UncompressedSize64),
ModTime: zipObjInfo.ModTime,
Bucket: bucket,
Name: object,
Size: int64(file.UncompressedSize64),
ModTime: zipObjInfo.ModTime,
ContentType: mime.TypeByExtension(filepath.Ext(object)),
}

var rc io.ReadCloser
Expand Down

0 comments on commit 9ab6f18

Please sign in to comment.