goto done_err;
}
-done_err:
send_response_data(bl, 0, 0);
+ return;
+
+done_err:
+ send_response_data_error();
}
int RGWGetObj::init_common()
int get_data_cb(bufferlist& bl, off_t ofs, off_t len);
virtual int get_params() = 0;
+ virtual int send_response_data_error() = 0;
virtual int send_response_data(bufferlist& bl, off_t ofs, off_t len) = 0;
virtual const string name() { return "get_obj"; }
{NULL, NULL},
};
+int RGWGetObj_ObjStore_S3::send_response_data_error()
+{
+ bufferlist bl;
+ return send_response_data(bl, 0 , 0);
+}
+
int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs, off_t bl_len)
{
const char *content_type = NULL;
RGWGetObj_ObjStore_S3() {}
~RGWGetObj_ObjStore_S3() {}
+ int send_response_data_error();
int send_response_data(bufferlist& bl, off_t ofs, off_t len);
};
return RGWGetObj_ObjStore::get_params();
}
+int RGWGetObj_ObjStore_SWIFT::send_response_data_error()
+{
+ bufferlist bl;
+ return send_response_data(bl, 0, 0);
+}
+
int RGWGetObj_ObjStore_SWIFT::send_response_data(bufferlist& bl, off_t bl_ofs, off_t bl_len)
{
string content_type;
~RGWGetObj_ObjStore_SWIFT() {}
int get_params();
+ int send_response_data_error();
int send_response_data(bufferlist& bl, off_t ofs, off_t len);
bool need_object_expiration() { return true; }
};