Commit 8a8da61e by xiongziliang

防止windows下字符编码错误

parent 0fc14996
...@@ -154,7 +154,8 @@ static inline void addHttpListener(){ ...@@ -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,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论