From 8d0cd56e99a785fd1ae5b6a0fc46d313979f6072 Mon Sep 17 00:00:00 2001 From: Shilpa Jagannath Date: Wed, 6 May 2026 17:50:17 -0400 Subject: [PATCH] rgw: fix frontend crash in abort_early() on client disconnect wrap the send_body() call in abort_early() with try/catch for rgw::io::Exception Signed-off-by: Shilpa Jagannath --- src/rgw/rgw_rest.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index a22baa7bca60..b0ccf81ef698 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -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); } -- 2.47.3