Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:alvistack
ceph-ceph-16.2.15
2030-src-rgw-rgw_asio_client.cc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2030-src-rgw-rgw_asio_client.cc.patch of Package ceph-ceph-16.2.15
diff --git a/src/rgw/rgw_asio_client.cc b/src/rgw/rgw_asio_client.cc index d7439363335..bd3dca496b2 100644 --- a/src/rgw/rgw_asio_client.cc +++ b/src/rgw/rgw_asio_client.cc @@ -39,11 +39,13 @@ int ClientIO::init_env(CephContext *cct) const auto& value = header->value(); if (field == beast::http::field::content_length) { - env.set("CONTENT_LENGTH", value.to_string()); + std::string scratch{value.data(), value.size()}; + env.set("CONTENT_LENGTH", scratch.c_str()); continue; } if (field == beast::http::field::content_type) { - env.set("CONTENT_TYPE", value.to_string()); + std::string scratch{value.data(), value.size()}; + env.set("CONTENT_TYPE", scratch.c_str()); continue; } @@ -60,26 +62,37 @@ int ClientIO::init_env(CephContext *cct) } *dest = '\0'; - env.set(buf, value.to_string()); + std::string scratch{value.data(), value.size()}; + env.set(buf, scratch.c_str()); } int major = request.version() / 10; int minor = request.version() % 10; env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); - env.set("REQUEST_METHOD", request.method_string().to_string()); + { + std::string scratch {request.method_string().data(),request.method_string().size()}; + env.set("REQUEST_METHOD", scratch.c_str()); + } // split uri from query auto uri = request.target(); auto pos = uri.find('?'); if (pos != uri.npos) { auto query = uri.substr(pos + 1); - env.set("QUERY_STRING", query.to_string()); + std::string scratch{query.data(), query.size()}; + env.set("QUERY_STRING", scratch.c_str()); uri = uri.substr(0, pos); } - env.set("SCRIPT_URI", uri.to_string()); + { + std::string scratch {uri.data(), uri.size()}; + env.set("SCRIPT_URI", scratch.c_str()); + } - env.set("REQUEST_URI", request.target().to_string()); + { + std::string scratch {request.target().data(), request.target().size()}; + env.set("REQUEST_URI", scratch.c_str()); + } char port_buf[16]; snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port());
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor