summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-05-29 22:13:12 -0600
committercflip <cflip@cflip.net>2023-05-29 22:23:21 -0600
commit775c4157994ee0ebe9bd951a99bc5d7558128ba4 (patch)
treee6bbfea51cf0c66e909e9cd6bd3f7c0747b14ebc /http.c
parentfca0a3d5d8ea1e9af4411ef03181b4c23534474b (diff)
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.
Diffstat (limited to 'http.c')
-rw-r--r--http.c2
1 files changed, 1 insertions, 1 deletions
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);
}