]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Do not duplicate query-string in ops-log 51025/head
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 11 Mar 2023 19:58:54 +0000 (14:58 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 11 Apr 2023 13:43:22 +0000 (09:43 -0400)
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 7595f14a3a7b20bec117b957abcf155c87647a7c..de67fcd4b1471795c07d237b349e155029117c5b 100644 (file)
@@ -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(" ");