From a73ea961c6a0d4f0c77b310a988e1fa5fb82d86f Mon Sep 17 00:00:00 2001 From: David Gerber Date: Sun, 24 Jan 2021 01:53:58 +0100 Subject: [PATCH] Fix JSON API mime type Most clients expect application/json which is standard, instead of text/json. --- libretroshare/src/jsonapi/jsonapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/jsonapi/jsonapi.cpp b/libretroshare/src/jsonapi/jsonapi.cpp index 3dcde2a27..3fc54f6b0 100644 --- a/libretroshare/src/jsonapi/jsonapi.cpp +++ b/libretroshare/src/jsonapi/jsonapi.cpp @@ -101,7 +101,7 @@ JsonApiServer::corsOptionsHeaders = ss << jAns; \ std::string&& ans(ss.str()); \ auto headers = corsHeaders; \ - headers.insert({ "Content-Type", "text/json" }); \ + headers.insert({ "Content-Type", "application/json" }); \ headers.insert({ "Content-Length", std::to_string(ans.length()) }); \ session->close(RET_CODE, ans, headers)