]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix frontend crash in abort_early() on client disconnect 68782/head
authorShilpa Jagannath <smanjara@redhat.com>
Wed, 6 May 2026 21:50:17 +0000 (17:50 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Wed, 6 May 2026 21:50:17 +0000 (17:50 -0400)
wrap the send_body() call in abort_early() with try/catch for
rgw::io::Exception

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
src/rgw/rgw_rest.cc

index a22baa7bca60974fd0f3397086e026e6b6c097e7..b0ccf81ef69846d1cf48b26f4641fdf71d0168d8 100644 (file)
@@ -746,7 +746,12 @@ void abort_early(req_state *s, RGWOp* op, int err_no,
        *   x-amz-error-detail-Key: foo
        */
       end_header(s, op, NULL, error_content.size(), false, true);
-      RESTFUL_IO(s)->send_body(error_content.c_str(), error_content.size());
+      try {
+        RESTFUL_IO(s)->send_body(error_content.c_str(), error_content.size());
+      } catch (rgw::io::Exception& e) {
+        ldpp_dout(s, 0) << "ERROR: abort_early: send_body() returned err="
+                        << e.what() << dendl;
+      }
     } else {
       end_header(s, op);
     }