diff options
| author | verdant <im@verdant.ee> | 2026-06-09 18:14:48 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-06-09 18:14:48 +0800 |
| commit | c5f4921a0e990217dabce7ffb1c7439bc3e98afe (patch) | |
| tree | 87d9895070098f016b573135e9cfd57ccf732107 | |
| parent | c5e5cd7418d1ed4d1be6a3cbececafa2b2a9b33d (diff) | |
| download | shsd-c5f4921a0e990217dabce7ffb1c7439bc3e98afe.tar.gz shsd-c5f4921a0e990217dabce7ffb1c7439bc3e98afe.zip | |
Use handle_client instead send file by hand
| -rw-r--r-- | server.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -139,11 +139,7 @@ int main(int argc, char **argv) send(new_fd, http_content_type, strlen(http_content_type), 0); - - FILE *index_fd = fopen("./index.html", "r"); - - struct stat stat_buf; - shsd_sendfile(new_fd, index_fd, &stat_buf); + handle_client(new_fd, buf); } memset(buf, 0, 1024); |
