diff --git a/platform/src/verify_policy.cpp b/platform/src/verify_policy.cpp index a9e7ff5..36a2aac 100644 --- a/platform/src/verify_policy.cpp +++ b/platform/src/verify_policy.cpp @@ -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); diff --git a/scan/src/pangu_http.cpp b/scan/src/pangu_http.cpp index 51b9fbb..353de53 100644 --- a/scan/src/pangu_http.cpp +++ b/scan/src/pangu_http.cpp @@ -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) { 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); } }