]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/beast: ClientIO remembers whether it sent '100 Continue'
authorCasey Bodley <cbodley@redhat.com>
Thu, 5 Jan 2023 16:28:12 +0000 (11:28 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 5 Jan 2023 16:28:20 +0000 (11:28 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_asio_client.cc
src/rgw/rgw_asio_client.h

index 82d5d43f8b8d141b0916eb1f527fbd73e29fdce2..a0ec0bf5c0683a33ab0e66be52be37deafbec83a 100644 (file)
@@ -123,6 +123,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;
 }
 
index a595b0351997ba452472c2bf7dd5f9ead1beebcf..8b03fe2e3da8856cefd1ecb587f4c991693088ec 100644 (file)
@@ -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