forked from TrueCloudLab/frostfs-s3-gw
[#152] Removed redundant GetBucketInfo call
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
7b1058a9bd
commit
e1c2cee365
1 changed files with 0 additions and 15 deletions
|
@ -34,21 +34,6 @@ func (h *handler) PutObjectHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
rid = api.GetRequestID(r.Context())
|
rid = api.GetRequestID(r.Context())
|
||||||
)
|
)
|
||||||
|
|
||||||
if _, err := h.obj.GetBucketInfo(r.Context(), bkt); err != nil {
|
|
||||||
h.log.Error("could not find bucket",
|
|
||||||
zap.String("request_id", rid),
|
|
||||||
zap.String("bucket_name", bkt),
|
|
||||||
zap.Error(err))
|
|
||||||
|
|
||||||
api.WriteErrorResponse(r.Context(), w, api.Error{
|
|
||||||
Code: api.GetAPIError(api.ErrBadRequest).Code,
|
|
||||||
Description: err.Error(),
|
|
||||||
HTTPStatusCode: http.StatusBadRequest,
|
|
||||||
}, r.URL)
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
metadata := parseMetadata(r)
|
metadata := parseMetadata(r)
|
||||||
|
|
||||||
params := &layer.PutObjectParams{
|
params := &layer.PutObjectParams{
|
||||||
|
|
Loading…
Reference in a new issue