in_cb.emplace(env, caller, req);
- int r = http_manager->add_request(req);
+ int r = req->send(http_manager);
if (r < 0) {
return r;
}
req->set_write_drain_cb(&write_drain_notify_cb);
- int r = http_manager->add_request(req);
+ int r = req->send(http_manager);
if (r < 0) {
return r;
}
headers.emplace_back(kv);
}
- if (!mgr) {
- return RGWHTTP::send(this);
- }
-
- int r = mgr->add_request(this);
- if (r < 0)
- return r;
-
- return 0;
+ return RGWHTTPStreamRWRequest::send(mgr);
}
int RGWHTTPStreamRWRequest::complete_request(optional_yield y,
}
return send_size;
}
+
+int RGWHTTPStreamRWRequest::send(RGWHTTPManager *mgr)
+{
+ if (!mgr) {
+ return RGWHTTP::send(this);
+ }
+
+ int r = mgr->add_request(this);
+ if (r < 0)
+ return r;
+
+ return 0;
+}
/* finish streaming writes */
void finish_write();
+ virtual int send(RGWHTTPManager *mgr);
+
int complete_request(optional_yield y,
std::string *etag = nullptr,
real_time *mtime = nullptr,
int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, std::map<std::string, std::string>& extra_headers, const std::string& resource, bufferlist *send_data = nullptr /* optional input data */);
int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey& key, std::map<std::string, std::string>& extra_headers, const rgw_obj& obj);
- int send(RGWHTTPManager *mgr);
+ int send(RGWHTTPManager *mgr) override;
int send_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, std::map<std::string, std::string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr);
int send_request(const DoutPrefixProvider *dpp, RGWAccessKey *key, std::map<std::string, std::string>& extra_headers, const std::string& resource, RGWHTTPManager *mgr, bufferlist *send_data = nullptr /* optional input data */);