/*
* FIXME: if s->object != new_obj, drop op and create a new op to handle
* operation. Or remove this comment if it's not applicable anymore
+ * dang: This could be problematic, since we're not actually replacing op, but
+ * we are replacing s->object. Something might have a pointer to it.
*/
-
- s->object = store->get_object(new_obj);
- s->object->set_bucket(s->bucket.get());
+ s->object = s->bucket->get_object(new_obj);
return 0;
}
getop->if_unmod = NULL;
getop->if_match = NULL;
getop->if_nomatch = NULL;
+ /* This is okay. It's an error, so nothing will run after this, and it can be
+ * called by abort_early(), which can be called before s->object or s->bucket
+ * are set up. Note, it won't have bucket. */
s->object = store->get_object(errordoc_key);
ret = init_permissions(getop.get(), y);
}
} get_errpage_op(store, handler, s, http_ret);
+ /* This is okay. It's an error, so nothing will run after this, and it can be
+ * called by abort_early(), which can be called before s->object or s->bucket
+ * are set up. */
if (!rgw::sal::Bucket::empty(s->bucket.get())) {
s->object = s->bucket->get_object(rgw_obj_key(std::to_string(http_ret) + error_doc));
} else {