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

Update server.c

This commit is contained in:
源文雨
2021-06-07 21:46:20 +08:00
committed by GitHub
parent 6798938c79
commit c11330eedd

View File

@@ -22,6 +22,8 @@
#if !__APPLE__
#include <sys/sendfile.h>
#else
struct sf_hdtr hdtr;
#endif
#define ISspace(x) isspace((int)(x))
@@ -154,7 +156,6 @@ void bad_request(int client) {
* Parameters: the client socket descriptor
* FILE pointer for the file to cat */
/**********************************************************************/
struct sf_hdtr hdtr;
void cat(int client, FILE *resource) {
fseek(resource, 0, SEEK_END);
off_t len = 0;