From 6ac53d4c783340ae9139c7f4dcfe9bfddace5892 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 25 Sep 2016 02:57:21 +0200 Subject: runserver: reimplemented http server without libevent yeah, this patch implements a "complete" http server for static files. It is not the best code possible, and would be easily DDoS'able if used in production, as it spawns a thread for each request, without limiting. I'm sickish and this is the best code I can deliver now. At least it works! ;) --- src/common/file.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common/file.h') diff --git a/src/common/file.h b/src/common/file.h index e095de7..498f4f4 100644 --- a/src/common/file.h +++ b/src/common/file.h @@ -10,10 +10,11 @@ #define _FILE_H #include +#include #include "error.h" #define BC_FILE_CHUNK_SIZE 1024 -char* bc_file_get_contents(const char *path, size_t *len, bc_error_t **err); +char* bc_file_get_contents(const char *path, bool utf8, size_t *len, bc_error_t **err); #endif /* _FILE_H */ -- cgit v1.2.3-18-g5258