aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2023-06-27 11:32:07 -0500
committerluigi1111 <luigi1111w@gmail.com>2023-06-27 11:32:07 -0500
commit02ebe9090e3c8f5c81d039dd0d98042d855075f3 (patch)
tree35e6feda44e7649092cd348e16ede1d7a6ed59cf /contrib
parentMerge pull request #8772 (diff)
parentepee: protect base64_chars, removed dead functions, speed up compile (diff)
downloadmonero-02ebe9090e3c8f5c81d039dd0d98042d855075f3.tar.xz
Merge pull request #8792
04dfdb3 epee: protect base64_chars, removed dead functions, speed up compile (Jeffro256)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/include/net/abstract_http_client.h1
-rw-r--r--contrib/epee/include/storages/http_abstract_invoke.h20
-rw-r--r--contrib/epee/include/string_coding.h2
-rw-r--r--contrib/epee/src/abstract_http_client.cpp10
4 files changed, 6 insertions, 27 deletions
diff --git a/contrib/epee/include/net/abstract_http_client.h b/contrib/epee/include/net/abstract_http_client.h
index 46b3747cd..29a7ce19b 100644
--- a/contrib/epee/include/net/abstract_http_client.h
+++ b/contrib/epee/include/net/abstract_http_client.h
@@ -54,7 +54,6 @@ namespace net_utils
std::string convert(char val);
std::string conver_to_url_format(const std::string& uri);
std::string convert_from_url_format(const std::string& uri);
- std::string convert_to_url_format_force_all(const std::string& uri);
namespace http
{
diff --git a/contrib/epee/include/storages/http_abstract_invoke.h b/contrib/epee/include/storages/http_abstract_invoke.h
index c615b20e6..aaeae292f 100644
--- a/contrib/epee/include/storages/http_abstract_invoke.h
+++ b/contrib/epee/include/storages/http_abstract_invoke.h
@@ -26,13 +26,10 @@
//
#pragma once
-#include <boost/utility/string_ref.hpp>
-#include <chrono>
-#include <string>
-#include "byte_slice.h"
-#include "portable_storage_template_helper.h"
+
#include "net/http_base.h"
-#include "net/http_server_handlers_map2.h"
+#include "net/jsonrpc_structs.h"
+#include "portable_storage_template_helper.h"
namespace epee
{
@@ -136,12 +133,5 @@ namespace epee
epee::json_rpc::error error_struct;
return invoke_http_json_rpc(uri, method_name, out_struct, result_struct, error_struct, transport, timeout, http_method, req_id);
}
-
- template<class t_command, class t_transport>
- bool invoke_http_json_rpc(const boost::string_ref uri, typename t_command::request& out_struct, typename t_command::response& result_struct, t_transport& transport, std::chrono::milliseconds timeout = std::chrono::seconds(15), const boost::string_ref http_method = "POST", const std::string& req_id = "0")
- {
- return invoke_http_json_rpc(uri, t_command::methodname(), out_struct, result_struct, transport, timeout, http_method, req_id);
- }
-
- }
-}
+ } // namespace net_utils
+} // namespace epee
diff --git a/contrib/epee/include/string_coding.h b/contrib/epee/include/string_coding.h
index 0d9c6c244..1e9da6fb2 100644
--- a/contrib/epee/include/string_coding.h
+++ b/contrib/epee/include/string_coding.h
@@ -35,7 +35,7 @@ namespace epee
namespace string_encoding
{
inline
- std::string& base64_chars()
+ const std::string& base64_chars()
{
static std::string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
diff --git a/contrib/epee/src/abstract_http_client.cpp b/contrib/epee/src/abstract_http_client.cpp
index 3ae09c90e..8897ad9ae 100644
--- a/contrib/epee/src/abstract_http_client.cpp
+++ b/contrib/epee/src/abstract_http_client.cpp
@@ -116,16 +116,6 @@ namespace net_utils
return result;
}
//----------------------------------------------------------------------------------------------------
- std::string convert_to_url_format_force_all(const std::string& uri)
- {
- std::string result;
-
- for(size_t i = 0; i!= uri.size(); i++)
- {
- result += convert(uri[i]);
- }
- return result;
- }
namespace http
{