Last active
August 29, 2015 14:03
-
-
Save caktux/b876fb0bf638f02387a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/jsonrpccpp/server/connectors/httpserver.cpp b/src/jsonrpccpp/server/connectors/httpserver.cpp | |
index 29088b3..b316a3a 100644 | |
--- a/src/jsonrpccpp/server/connectors/httpserver.cpp | |
+++ b/src/jsonrpccpp/server/connectors/httpserver.cpp | |
@@ -124,8 +124,10 @@ bool HttpServer::SendResponse(const std::string& response, void* addInfo) | |
{ | |
struct mg_connection* conn = (struct mg_connection*) addInfo; | |
if (mg_printf(conn, "HTTP/1.1 200 OK\r\n" | |
- "Content-Type: application/json\r\n" | |
+ "Content-Type: application/json; charset=utf-8\r\n" | |
"Content-Length: %d\r\n" | |
+ "Access-Control-Allow-Origin: *\r\n" | |
+ "Access-Control-Allow-Headers: Content-Type\r\n" | |
"\r\n" | |
"%s",(int)response.length(), response.c_str()) > 0) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment