aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-01-16 17:46:12 -0800
committerAlexander Blair <snipa@jagtech.io>2020-01-16 17:46:13 -0800
commit8039fd4cab82451e6806f98af0b8a64cff9ac97d (patch)
tree466ea4d5c4c24b11a32e0f5896193a0abc7975d3 /contrib/epee/include
parentMerge pull request #6141 (diff)
parentepee: set application/json MIME type on json errors (diff)
downloadmonero-8039fd4cab82451e6806f98af0b8a64cff9ac97d.tar.xz
Merge pull request #6143
6efeefbc epee: set application/json MIME type on json errors (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include')
-rw-r--r--contrib/epee/include/net/http_server_handlers_map2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/epee/include/net/http_server_handlers_map2.h b/contrib/epee/include/net/http_server_handlers_map2.h
index 07ed8157b..0c0653cd6 100644
--- a/contrib/epee/include/net/http_server_handlers_map2.h
+++ b/contrib/epee/include/net/http_server_handlers_map2.h
@@ -120,6 +120,7 @@
#define BEGIN_JSON_RPC_MAP(uri) else if(query_info.m_URI == uri) \
{ \
uint64_t ticks = epee::misc_utils::get_tick_count(); \
+ response_info.m_mime_tipe = "application/json"; \
epee::serialization::portable_storage ps; \
if(!ps.load_from_json(query_info.m_body)) \
{ \
@@ -148,6 +149,7 @@
#define PREPARE_OBJECTS_FROM_JSON(command_type) \
handled = true; \
+ response_info.m_mime_tipe = "application/json"; \
boost::value_initialized<epee::json_rpc::request<command_type::request> > req_; \
epee::json_rpc::request<command_type::request>& req = static_cast<epee::json_rpc::request<command_type::request>&>(req_);\
if(!req.load(ps)) \