Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
return;
}
+ /* Check whether the object has expired. Swift API documentation
+ * stands that we should return 404 Not Found in such case. */
+ if (need_object_expiration() && object_is_expired(orig_attrs)) {
+ ret = -ENOENT;
+ return;
+ }
+
/* Filter currently existing attributes. */
prepare_add_del_attrs(orig_attrs, attrs, rmattrs);
populate_with_generic_attrs(s, attrs);
virtual const string name() { return "put_obj_metadata"; }
virtual RGWOpType get_type() { return RGW_OP_PUT_METADATA_OBJECT; }
virtual uint32_t op_mask() { return RGW_OP_TYPE_WRITE; }
+ virtual bool need_object_expiration() { return false; }
};
class RGWDeleteObj : public RGWOp {
int get_params();
void send_response();
+ bool need_object_expiration() { return true; }
};
class RGWDeleteObj_ObjStore_SWIFT : public RGWDeleteObj_ObjStore {