From 6efeefbca20d573b76513869b688f1ea1daae709 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 15 Nov 2019 19:38:41 +0000 Subject: epee: set application/json MIME type on json errors --- contrib/epee/include/net/http_server_handlers_map2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'contrib/epee') 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 > req_; \ epee::json_rpc::request& req = static_cast&>(req_);\ if(!req.load(ps)) \ -- cgit v1.2.3