diff options
Diffstat (limited to 'recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch')
-rw-r--r-- | recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch b/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch new file mode 100644 index 00000000..0b4fc984 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From f807220d13adc0656c30d3207d11c70360b88d06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 13 Mar 2024 03:14:55 -0700 | ||
4 | Subject: [PATCH] avoid to_string error | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/rgw/rgw_asio_client.cc | 15 ++++++++------- | ||
11 | 1 file changed, 8 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/src/rgw/rgw_asio_client.cc b/src/rgw/rgw_asio_client.cc | ||
14 | index a0ec0bf5c..17880eda5 100644 | ||
15 | --- a/src/rgw/rgw_asio_client.cc | ||
16 | +++ b/src/rgw/rgw_asio_client.cc | ||
17 | @@ -3,6 +3,7 @@ | ||
18 | |||
19 | #include <boost/algorithm/string/predicate.hpp> | ||
20 | #include <boost/asio/write.hpp> | ||
21 | +#include <string_view> | ||
22 | |||
23 | #include "rgw_asio_client.h" | ||
24 | #include "rgw_perf_counters.h" | ||
25 | @@ -39,11 +40,11 @@ int ClientIO::init_env(CephContext *cct) | ||
26 | const auto& value = header->value(); | ||
27 | |||
28 | if (field == beast::http::field::content_length) { | ||
29 | - env.set("CONTENT_LENGTH", value.to_string()); | ||
30 | + env.set("CONTENT_LENGTH", std::string(value)); | ||
31 | continue; | ||
32 | } | ||
33 | if (field == beast::http::field::content_type) { | ||
34 | - env.set("CONTENT_TYPE", value.to_string()); | ||
35 | + env.set("CONTENT_TYPE", std::string(value)); | ||
36 | continue; | ||
37 | } | ||
38 | |||
39 | @@ -62,26 +63,26 @@ int ClientIO::init_env(CephContext *cct) | ||
40 | } | ||
41 | *dest = '\0'; | ||
42 | |||
43 | - env.set(buf, value.to_string()); | ||
44 | + env.set(buf, std::string(value)); | ||
45 | } | ||
46 | |||
47 | int major = request.version() / 10; | ||
48 | int minor = request.version() % 10; | ||
49 | env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); | ||
50 | |||
51 | - env.set("REQUEST_METHOD", request.method_string().to_string()); | ||
52 | + env.set("REQUEST_METHOD", std::string(request.method_string())); | ||
53 | |||
54 | // split uri from query | ||
55 | auto uri = request.target(); | ||
56 | auto pos = uri.find('?'); | ||
57 | if (pos != uri.npos) { | ||
58 | auto query = uri.substr(pos + 1); | ||
59 | - env.set("QUERY_STRING", query.to_string()); | ||
60 | + env.set("QUERY_STRING", std::string(query)); | ||
61 | uri = uri.substr(0, pos); | ||
62 | } | ||
63 | - env.set("SCRIPT_URI", uri.to_string()); | ||
64 | + env.set("SCRIPT_URI", std::string(uri)); | ||
65 | |||
66 | - env.set("REQUEST_URI", request.target().to_string()); | ||
67 | + env.set("REQUEST_URI", std::string(request.target())); | ||
68 | |||
69 | char port_buf[16]; | ||
70 | snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port()); | ||
71 | -- | ||
72 | 2.42.0 | ||
73 | |||