request_payload_hash = "UNSIGNED-PAYLOAD";
} else {
if (s->aws4_auth_needs_complete) {
- request_payload_hash = RESTFUL_IO(s)->grab_aws4_sha256_hash();
+ request_payload_hash = AWS_AUTHv4_IO(s)->grab_aws4_sha256_hash();
} else {
if (s->aws4_auth_streaming_mode) {
request_payload_hash = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD";
/* Type conversions to work around lack of req_state type hierarchy matching
* (e.g.) REST backends (may be replaced w/dynamic typed req_state). */
-static inline RGWRestfulIO* RESTFUL_IO(struct req_state* s) {
- return static_cast<RGWRestfulIO*>(s->cio);
+static inline rgw::io::RestfulClient* RESTFUL_IO(struct req_state* s) {
+ return static_cast<rgw::io::RestfulClient*>(s->cio);
}
static inline rgw::io::Accounter* ACCOUNTING_IO(struct req_state* s) {
return dynamic_cast<rgw::io::Accounter*>(s->cio);
}
+static inline RGWRestfulIO* AWS_AUTHv4_IO(struct req_state* s) {
+ return static_cast<RGWRestfulIO*>(s->cio);
+}
+
class RGWClientIOStreamBuf : public std::streambuf {
protected:
const size_t max)
{
try {
- return RESTFUL_IO(s)->recv_body(buf, max, s->aws4_auth_needs_complete);
+ return AWS_AUTHv4_IO(s)->recv_body(buf, max, s->aws4_auth_needs_complete);
} catch (rgw::io::RestfulClient::Exception& e) {
return -e.code().value();
}