From c3385d8a102faf5379559bb98cf89637ceda1579 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 21 Aug 2013 17:22:46 -0700 Subject: [PATCH] rgw: OPTIONS request doesn't need to read object info This is a bucket-only operation, so we shouldn't look at the object. Object may not exist and we might respond with Not Exists response which is not what we want. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 571e486964227..05d67fbeeff0f 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1062,7 +1062,7 @@ int RGWHandler_ObjStore::read_permissions(RGWOp *op_obj) case OP_COPY: // op itself will read and verify the permissions return 0; case OP_OPTIONS: - only_bucket = false; + only_bucket = true; break; default: return -EINVAL; -- 2.39.5