1
0
mirror of https://github.com/fumiama/simple-http-server.git synced 2026-06-05 00:30:23 +08:00

避免打印错误

This commit is contained in:
源文雨
2021-06-08 15:40:37 +08:00
parent 33c5e0ec85
commit 4582b7a706

View File

@@ -272,8 +272,8 @@ static void execute_cgi(int client, const char *path, const char *method, const
if(cnt > 0) {
loff_t len = 0;
loff_t offin = 0;
splice(cgi_output[0], &offin, client, &len, cnt, SPLICE_F_GIFT);
printf("cgi send %ld bytes\n", len);
splice(cgi_output[0], &offin, client, &len, (size_t)cnt, SPLICE_F_GIFT);
printf("cgi send %d bytes\n", len);
}
} else cannot_execute(client);
close(cgi_output[0]);