修改联调过程中存在的编码问题

This commit is contained in:
fengweihao
2020-02-27 14:40:54 +08:00
parent 2d69e01ae5
commit f73e7d2b82
2 changed files with 3 additions and 3 deletions

View File

@@ -330,7 +330,7 @@ cJSON *get_query_from_request(const char *data, int thread_id)
{
int item = 0;
cJSON *verfifySession = cJSON_CreateObject();
cJSON_AddItemToObject(data_obj, "verfifySession", verfifySession);
cJSON_AddItemToObject(data_obj, "verifySession", verfifySession);
cJSON *attributes=cJSON_CreateArray();
cJSON_AddItemToObject(verfifySession, "attributes", attributes);
for (item = 0; item < i; item++)
@@ -369,7 +369,7 @@ static int evhttp_socket_send(struct evhttp_request *req, char *sendbuf)
goto err;
}
evhttp_add_header(evhttp_request_get_output_headers(req),
"Content-Type", "text/html");
"Content-Type", "application/json");
evhttp_add_header(evhttp_request_get_output_headers(req), "Connection", "keep-alive");
evbuffer_add_printf(evb, "%s", sendbuf);
evhttp_send_reply(req, HTTP_OK, "OK", evb);