Update firewall.c

This commit is contained in:
Dengfeng Liu 2019-07-24 11:12:55 +08:00 committed by GitHub
parent 4053253373
commit a522b64d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,8 +557,8 @@ ev_fw_sync_with_authserver_v2(struct wd_request_context *context)
if (!wd_make_request(context, &evcon, &req, process_auth_server_counter_v2)) {
const char *param = json_object_to_json_string(clients_info);
assert(param != NULL);
char len[8] = {0};
snprintf(len, 8, "%lu", strlen(param));
char len[20] = {0};
snprintf(len, 20, "%lu", strlen(param));
evhttp_remove_header(evhttp_request_get_output_headers(req), "Content-Type");
evhttp_add_header(evhttp_request_get_output_headers(req), "Content-Type", "application/json");
evhttp_add_header(evhttp_request_get_output_headers(req), "Content-Length", len);