d2dbe7550296da6db885b5344c71f77f9acbfd8f added a rgw_forward_request_to_master()
that took the input bufferlist by pointer instead of reference so it
could be optional; however, RGWRESTSimpleRequest::forward_request()
omits the Content-Length header when the data is nullptr. this was an
unintended change and broke the forwarding of some requests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
}
const RGWAccessKey& creds = site.get_zone_params().system_key;
+ bufferlist data;
+ if (indata == nullptr) {
+ // forward() needs an input bufferlist to set the content-length
+ indata = &data;
+ }
+
// use the master zone's endpoints
auto conn = RGWRESTConn{dpp->get_cct(), z->second.id, z->second.endpoints,
creds, zg->second.id, zg->second.api_name};