summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_op.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2023-11-21 04:48:55 +0100
committerCasey Bodley <cbodley@redhat.com>2023-11-24 16:36:28 +0100
commitccd241c565aa898231e4bfa4ea313c3406b55391 (patch)
treeee991f2fc0fb4ba2919ffbbbba397fadbd6f3b3b /src/rgw/rgw_op.cc
parentrgw: add headers to guide cache update in 304 response to conditional get (diff)
downloadceph-ccd241c565aa898231e4bfa4ea313c3406b55391.tar.xz
ceph-ccd241c565aa898231e4bfa4ea313c3406b55391.zip
rgw/s3: RGWGetObj still sets attrs on ReadOp error
when `ReadOp::prepare()` fails with `-ERR_NOT_MODIFIED`, it succeeded in reading the head object for mtime and attrs like etag. make those attrs available to RGWGetObj so we can still send ETag and other cache-related response headers Fixes: https://tracker.ceph.com/issues/45736 Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_op.cc')
-rw-r--r--src/rgw/rgw_op.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 6a7a7313e11..efc0053c8a2 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -2286,12 +2286,12 @@ void RGWGetObj::execute(optional_yield y)
}
op_ret = read_op->prepare(s->yield, this);
- if (op_ret < 0)
- goto done_err;
version_id = s->object->get_instance();
s->obj_size = s->object->get_obj_size();
attrs = s->object->get_attrs();
multipart_parts_count = read_op->params.parts_count;
+ if (op_ret < 0)
+ goto done_err;
/* STAT ops don't need data, and do no i/o */
if (get_type() == RGW_OP_STAT_OBJ) {