From: Matt Benjamin Date: Sat, 11 Mar 2023 19:58:54 +0000 (-0500) Subject: Do not duplicate query-string in ops-log X-Git-Tag: v17.2.8~158^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1f7e64ca0b5de7a4517388adb5ddbc7cfd6d958c;p=ceph.git Do not duplicate query-string in ops-log Fixes: https://tracker.ceph.com/issues/59059 Signed-off-by: Matt Benjamin (cherry picked from commit 3f2313f0e67c444407139c80dff596c5d5b5903e) --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 5f7598a41f6a8..e200b2151c17f 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -601,13 +601,9 @@ int rgw_log_op(RGWREST* const rest, struct req_state *s, const RGWOp* op, OpsLog uri.append(s->info.env->get("REQUEST_URI")); } - if (s->info.env->exists("QUERY_STRING")) { - const char* qs = s->info.env->get("QUERY_STRING"); - if(qs && (*qs != '\0')) { - uri.append("?"); - uri.append(qs); - } - } + /* Formerly, we appended QUERY_STRING to uri, but in RGW, QUERY_STRING is a + * substring of REQUEST_URI--appending qs to uri here duplicates qs to the + * ops log */ if (s->info.env->exists("HTTP_VERSION")) { uri.append(" ");