mirror of
https://github.com/fumiama/simple-http-server.git
synced 2026-06-12 14:10:40 +08:00
Update server.c
This commit is contained in:
3
server.c
3
server.c
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#if !__APPLE__
|
#if !__APPLE__
|
||||||
#include <sys/sendfile.h>
|
#include <sys/sendfile.h>
|
||||||
|
#else
|
||||||
|
struct sf_hdtr hdtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ISspace(x) isspace((int)(x))
|
#define ISspace(x) isspace((int)(x))
|
||||||
@@ -154,7 +156,6 @@ void bad_request(int client) {
|
|||||||
* Parameters: the client socket descriptor
|
* Parameters: the client socket descriptor
|
||||||
* FILE pointer for the file to cat */
|
* FILE pointer for the file to cat */
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
struct sf_hdtr hdtr;
|
|
||||||
void cat(int client, FILE *resource) {
|
void cat(int client, FILE *resource) {
|
||||||
fseek(resource, 0, SEEK_END);
|
fseek(resource, 0, SEEK_END);
|
||||||
off_t len = 0;
|
off_t len = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user