mirror of
https://github.com/fumiama/simple-http-server.git
synced 2026-06-05 00:30:23 +08:00
避免打印错误
This commit is contained in:
4
server.c
4
server.c
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user