]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Do not duplicate query-string in ops-log 57132/head
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 11 Mar 2023 19:58:54 +0000 (14:58 -0500)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 24 Jul 2024 17:34:16 +0000 (00:34 +0700)
Fixes: https://tracker.ceph.com/issues/59059
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 3f2313f0e67c444407139c80dff596c5d5b5903e)

src/rgw/rgw_log.cc

index 5f7598a41f6a8e6e5d4e66ea1ae03e287b567427..e200b2151c17ff6fb7080cd846421ca90fea5411 100644 (file)
@@ -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(" ");