From 4789b109c0f782834477367985a8ee854f1b4866 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 5 Jan 2023 11:28:12 -0500 Subject: [PATCH] rgw/beast: ClientIO remembers whether it sent '100 Continue' Signed-off-by: Casey Bodley (cherry picked from commit 99228e17543d2cfed903b801919ef3e5f4847ba7) --- src/rgw/rgw_asio_client.cc | 1 + src/rgw/rgw_asio_client.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/rgw/rgw_asio_client.cc b/src/rgw/rgw_asio_client.cc index ccafa3498b8ef..d74393633351b 100644 --- a/src/rgw/rgw_asio_client.cc +++ b/src/rgw/rgw_asio_client.cc @@ -121,6 +121,7 @@ size_t ClientIO::send_100_continue() const size_t sent = txbuf.sputn(HTTTP_100_CONTINUE, sizeof(HTTTP_100_CONTINUE) - 1); flush(); + sent100continue = true; return sent; } diff --git a/src/rgw/rgw_asio_client.h b/src/rgw/rgw_asio_client.h index a595b0351997b..8b03fe2e3da88 100644 --- a/src/rgw/rgw_asio_client.h +++ b/src/rgw/rgw_asio_client.h @@ -30,6 +30,7 @@ class ClientIO : public io::RestfulClient, RGWEnv env; rgw::io::StaticOutputBufferer<> txbuf; + bool sent100continue = false; public: ClientIO(parser_type& parser, bool is_ssl, @@ -54,6 +55,8 @@ class ClientIO : public io::RestfulClient, RGWEnv& get_env() noexcept override { return env; } + + bool sent_100_continue() const { return sent100continue; } }; } // namespace asio -- 2.39.5