}
if (!error_content.empty()) {
ldout(s->cct, 20) << "error_content is set, we need to serve it INSTEAD of firing the formatter" << dendl;
-#warning TODO we must add all error entries as headers here
+ /*
+ * FIXME we must add all error entries as headers here:
+ * when having a working errordoc, then the s3 error fields are rendered as HTTP headers, e.g.:
+ *
+ * x-amz-error-code: NoSuchKey
+ * x-amz-error-message: The specified key does not exist.
+ * x-amz-error-detail-Key: foo
+ */
end_header(s, op, NULL, NO_CONTENT_LENGTH, false, true);
s->cio->write(error_content.c_str(), error_content.size());
s->formatter->reset();
return -ERR_WEBSITE_REDIRECT;
}
-#warning FIXME
-#if 0
- if (s->object.empty() != new_obj.empty()) {
- op->put();
- s->object = new_obj;
- *new_op = get_op();
- }
-#endif
+ /*
+ * 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
+ */
s->object = new_obj;
// 1. Check if errordoc exists
// 2. Check if errordoc is public
// 3. Fetch errordoc content
-#warning 2015119: FIXME need to clear all
+ /*
+ * FIXME maybe: need to make sure all of the fields for conditional requests are cleared
+ */
RGWGetObj_ObjStore_S3Website *getop = new RGWGetObj_ObjStore_S3Website(true);
getop->set_get_data(true);
getop->init(store, s, this);
int64_t ofs = 0;
int64_t end = -1;
ret = read_op.prepare(&ofs, &end);
- if (ret < 0)
- return ret;
+ if (ret < 0) {
+ goto done;
+ }
ret = read_op.iterate(ofs, end, &cb); // FIXME: need to know the final size?
+done:
+ delete getop;
return ret;
}