]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
<rgw> Ensure the ETag format is consistent with AWS S3 API
authorliubingrun <liubr1@chinatelecom.cn>
Thu, 24 Oct 2024 14:23:09 +0000 (10:23 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 27 May 2025 20:09:45 +0000 (16:09 -0400)
commit7c428f58b725c9b7a71348eda63f34196beaf5f9
treea71c0f383b985e06fedfb21182ac8ebba2809040
parent9ef35d514dba39d08d563f9ad93c7db9461e6eac
<rgw> Ensure the ETag format is consistent with AWS S3 API

AWS S3 API quotes ETAG everywhere. We still missed a few places.

checked with following cmd.
```
$ rg -i "dump.*\"ETag\"" ceph
./src/rgw/rgw_rest_s3.cc
1863:        s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
1955:      s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2030:        s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2099:      s->formatter->dump_format("ETag", "\"%s\"", iter->meta.etag.c_str());
2785:      s->formatter->dump_format("ETag", "\"%s\"", etag.c_str());
3422:    s->formatter->dump_string("ETag", etag);
3725:      s->formatter->dump_format("ETag", "\"%s\"",etag.c_str());
4228:    s->formatter->dump_string("ETag", etag);
4298:      s->formatter->dump_format("ETag", "\"%s\"", part->get_etag().c_str());

./src/rgw/rgw_rest.cc
421:    return dump_header(s, "etag", etag);
423:    return dump_header_quoted(s, "ETag", etag);

./src/rgw/driver/rados/rgw_sync_module_es_rest.cc
347:      s->formatter->dump_format("ETag", "\"%s\"", e.meta.etag.c_str());

./src/rgw/rgw_admin.cc
8612:        handled = dump_string("etag", bl, formatter.get());
```

Signed-off-by: liubingrun <liubr1@chinatelecom.cn>
(cherry picked from commit b8795299aacfa2aee5ec4a6fe117424e2ce97b88)

Conflicts:
src/rgw/rgw_rest_s3.cc no checksums in response
src/rgw/rgw_rest_s3.cc