From 263eea9ba646e128b879a3a00323fe54f6faf445 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Sat, 11 Mar 2023 14:58:54 -0500 Subject: [PATCH] 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) --- src/rgw/rgw_log.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 7595f14a3a7b2..de67fcd4b1471 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(" "); -- 2.39.5