防止windows下字符编码错误

This commit is contained in:
xiongziliang 2020-04-08 13:54:44 +08:00
parent 0fc1499643
commit 8a8da61ef5

View File

@ -154,7 +154,8 @@ static inline void addHttpListener(){
HttpSession::KeyValue headerOut; HttpSession::KeyValue headerOut;
auto allArgs = getAllArgs(parser); auto allArgs = getAllArgs(parser);
HttpSession::KeyValue &headerIn = parser.getValues(); HttpSession::KeyValue &headerIn = parser.getValues();
headerOut["Content-Type"] = "application/json; charset=utf-8"; GET_CONFIG(string,charSet,Http::kCharSet);
headerOut["Content-Type"] = StrPrinter << "application/json; charset=" << charSet;
if(api_debug){ if(api_debug){
auto newInvoker = [invoker,parser,allArgs](const string &codeOut, auto newInvoker = [invoker,parser,allArgs](const string &codeOut,
const HttpSession::KeyValue &headerOut, const HttpSession::KeyValue &headerOut,