是否必须 discard 头部?
作者: vmjie创建于 2017年3月29日更新于 2022年5月6日
sprintf(path, "htdocs%s", url); if (path[strlen(path) - 1] == '/') strcat(path, "index.html"); if (stat(path, &st) == -1) { while ((numchars > 0) && strcmp("\n", buf)) /* 读取并丢弃头部 */ numchars = get_line(client, buf, sizeof(buf)); not_found(client); }
内容来源: EZLippi/Tinyhttpd