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: v19.0.0~1530^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f2313f0e67c444407139c80dff596c5d5b5903e;p=ceph.git Do not duplicate query-string in ops-log Fixes: https://tracker.ceph.com/issues/59059 Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 7595f14a3a7b..de67fcd4b147 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -605,13 +605,9 @@ int rgw_log_op(RGWREST* const rest, req_state *s, const RGWOp* op, OpsLogSink *o 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(" ");