修改联调过程中存在的编码问题
This commit is contained in:
@@ -330,7 +330,7 @@ cJSON *get_query_from_request(const char *data, int thread_id)
|
|||||||
{
|
{
|
||||||
int item = 0;
|
int item = 0;
|
||||||
cJSON *verfifySession = cJSON_CreateObject();
|
cJSON *verfifySession = cJSON_CreateObject();
|
||||||
cJSON_AddItemToObject(data_obj, "verfifySession", verfifySession);
|
cJSON_AddItemToObject(data_obj, "verifySession", verfifySession);
|
||||||
cJSON *attributes=cJSON_CreateArray();
|
cJSON *attributes=cJSON_CreateArray();
|
||||||
cJSON_AddItemToObject(verfifySession, "attributes", attributes);
|
cJSON_AddItemToObject(verfifySession, "attributes", attributes);
|
||||||
for (item = 0; item < i; item++)
|
for (item = 0; item < i; item++)
|
||||||
@@ -369,7 +369,7 @@ static int evhttp_socket_send(struct evhttp_request *req, char *sendbuf)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
evhttp_add_header(evhttp_request_get_output_headers(req),
|
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");
|
evhttp_add_header(evhttp_request_get_output_headers(req), "Connection", "keep-alive");
|
||||||
evbuffer_add_printf(evb, "%s", sendbuf);
|
evbuffer_add_printf(evb, "%s", sendbuf);
|
||||||
evhttp_send_reply(req, HTTP_OK, "OK", evb);
|
evhttp_send_reply(req, HTTP_OK, "OK", evb);
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ void get_scan_status(struct verify_policy_query_obj *query_obj, cJSON *attribute
|
|||||||
if(ctx->hit_path[i].compile_id > 0)
|
if(ctx->hit_path[i].compile_id > 0)
|
||||||
{
|
{
|
||||||
cJSON_AddNumberToObject(histObj, "topObjectId", ctx->hit_path[i].top_group_id);
|
cJSON_AddNumberToObject(histObj, "topObjectId", ctx->hit_path[i].top_group_id);
|
||||||
cJSON_AddNumberToObject(histObj, "protocolField", ctx->hit_path[i].virtual_table_id);
|
//cJSON_AddNumberToObject(histObj, "protocolField", ctx->hit_path[i].virtual_table_id);
|
||||||
cJSON_AddNumberToObject(histObj, "policyId", ctx->hit_path[i].compile_id);
|
cJSON_AddNumberToObject(histObj, "policyId", ctx->hit_path[i].compile_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user