Revert "treewide: seastar module update and fix broken rest client"
This reverts commit 44d34663bc of PR
https://github.com/scylladb/scylladb/pull/25915.
Breaks articact tests on ARM, blocking us from building new images from
master.
This commit is contained in:
@@ -399,7 +399,8 @@ future<rjson::value> azure_host::impl::send_request(const sstring& host, unsigne
|
||||
client.target(path);
|
||||
client.method(httpd::operation_type::POST);
|
||||
client.add_header("Authorization", fmt::format("Bearer {}", token.token));
|
||||
client.content("application/json", std::move(rjson::print(body)));
|
||||
client.add_header("Content-Type", "application/json");
|
||||
client.content(std::move(rjson::print(body)));
|
||||
|
||||
azlog.trace("Sending request: {}", rest::redacted_request_type{ client.request(), filter });
|
||||
|
||||
|
||||
@@ -808,7 +808,7 @@ future<encryption::kms_host::impl::result_type> encryption::kms_host::impl::post
|
||||
|
||||
client.add_header(AWS_AUTHORIZATION_HEADER, awsAuthString);
|
||||
client.target("/");
|
||||
client.content(query.content_type, query.content);
|
||||
client.content(query.content);
|
||||
client.method(httpclient::method_type::POST);
|
||||
|
||||
kms_log.trace("Request: {}", client.request());
|
||||
|
||||
2
seastar
2
seastar
Submodule seastar updated: b6be384e5d...c2d9893334
@@ -170,7 +170,8 @@ future<sstring> service_principal_credentials::post(const sstring& body) {
|
||||
rest::httpclient client{_host, _port, std::move(creds), options};
|
||||
client.target(path);
|
||||
client.method(op);
|
||||
client.content(mime_type, std::move(body));
|
||||
client.add_header("Content-Type", mime_type);
|
||||
client.content(std::move(body));
|
||||
|
||||
if (az_creds_logger.is_enabled(log_level::trace)) {
|
||||
az_creds_logger.trace("[{}] Sending request: {}", *this, rest::redacted_request_type{ client.request(), filter });
|
||||
|
||||
@@ -294,9 +294,13 @@ utils::gcp::storage::client::impl::send_with_retry(const std::string& path, cons
|
||||
req.add_header(k, v);
|
||||
}
|
||||
|
||||
if (!content_type.empty()) {
|
||||
req.add_header(httpclient::CONTENT_TYPE_HEADER, content_type);
|
||||
}
|
||||
|
||||
std::visit(overloaded_functor {
|
||||
[&](const std::string& s) { req.content(content_type, s); },
|
||||
[&](const writer_and_size& ws) { req.content(content_type, ws.first, ws.second); }
|
||||
[&](const std::string& s) { req.content(s); },
|
||||
[&](const writer_and_size& ws) { req.content(ws.first, ws.second); }
|
||||
}, body);
|
||||
|
||||
// GCP storage requires this even if content is empty
|
||||
|
||||
@@ -39,12 +39,14 @@ void rest::request_wrapper::method(method_type type) {
|
||||
_req._method = httpd::type2str(type);
|
||||
}
|
||||
|
||||
void rest::request_wrapper::content(std::string_view content_type, std::string_view content) {
|
||||
_req.write_body(sstring(content_type), sstring(content));
|
||||
void rest::request_wrapper::content(std::string_view content) {
|
||||
_req.content_length = content.size();
|
||||
_req.content = sstring(content);
|
||||
}
|
||||
|
||||
void rest::request_wrapper::content(std::string_view content_type, body_writer w, size_t len) {
|
||||
_req.write_body(sstring(content_type), len, std::move(w));
|
||||
void rest::request_wrapper::content(body_writer w, size_t len) {
|
||||
_req.content_length = len;
|
||||
_req.body_writer = std::move(w);
|
||||
}
|
||||
|
||||
void rest::request_wrapper::target(std::string_view s) {
|
||||
@@ -217,7 +219,8 @@ future<> rest::send_request(std::string_view uri
|
||||
if (content_type.empty()) {
|
||||
content_type = "application/x-www-form-urlencoded";
|
||||
}
|
||||
client.content(content_type, std::move(body));
|
||||
client.content(std::move(body));
|
||||
client.add_header(httpclient::CONTENT_TYPE_HEADER, content_type);
|
||||
}
|
||||
|
||||
co_await client.send([&] (const http::reply& rep, std::string_view result) {
|
||||
|
||||
@@ -41,8 +41,8 @@ public:
|
||||
using body_writer = decltype(std::declval<seastar::http::request>().body_writer);
|
||||
|
||||
void method(method_type);
|
||||
void content(std::string_view content_type, std::string_view);
|
||||
void content(std::string_view content_type, body_writer, size_t);
|
||||
void content(std::string_view);
|
||||
void content(body_writer, size_t);
|
||||
|
||||
void target(std::string_view);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user