From 775c4157994ee0ebe9bd951a99bc5d7558128ba4 Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 29 May 2023 22:13:12 -0600 Subject: Hacks to make it possible to serve PHP pages The most significant change is that the functions for reading a file and such write directly to the socket instead of attempting to fill buffers. --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http.c') diff --git a/http.c b/http.c index b6bad8e..40a2b82 100644 --- a/http.c +++ b/http.c @@ -32,5 +32,5 @@ void http_free_request(struct http_request *req) int http_build_response(char *res, enum http_res_code code, const char *msg, size_t msglen) { - return snprintf(res, CFWS_MAX_RESPONSE, "HTTP/1.1 200 OK\r\n\r\n%.*s\r\n", msglen, msg); + return snprintf(res, CFWS_MAX_RESPONSE, "HTTP/1.1 200 OK\r\n%.*s\r\n", msglen, msg); } -- cgit v1.2.3