From f776ebf34442e0ac6dfc46afd5ac47793db82ac3 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 11 Sep 2024 00:02:08 -0500 Subject: add res:stop --- src/net/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net/util.h') diff --git a/src/net/util.h b/src/net/util.h index 98d4d93..fbe73f8 100644 --- a/src/net/util.h +++ b/src/net/util.h @@ -32,7 +32,7 @@ int parse_header(char* buffer, int header_eof, parray_t** _table); * @param {char*} response content * @param {size_t} content length */ -void http_build(str** _dest, int code, char* code_det, char* header_vs, char* content, size_t len); +void http_build(str** _dest, int code, const char* code_det, char* header_vs, char* content, size_t len); /** * @brief gets a string representation of a http code @@ -40,7 +40,7 @@ void http_build(str** _dest, int code, char* code_det, char* header_vs, char* co * @param {int} http response code * @param {char*} allocated destination string */ -void http_code(int code, char* code_det); +const char* http_code(int code); void client_fd_errors(int client_fd); -- cgit v1.2.3 From e29d3ea86551380ace8e2c86c9f1f63e901941e1 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Sun, 29 Sep 2024 02:49:05 -0500 Subject: docs n stuff --- src/net/util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/net/util.h') diff --git a/src/net/util.h b/src/net/util.h index fbe73f8..e592420 100644 --- a/src/net/util.h +++ b/src/net/util.h @@ -1,5 +1,7 @@ #include "common.h" #include "../types/larray.h" + +#define MIMETYPES "/etc/mime.types" /** * @brief calls recv into buffer until everything is read * @@ -50,3 +52,4 @@ parray_t* route_match(parray_t* paths, char* path, larray_t** params); int match_param(char* path, char* match, parray_t* arr); +void parse_mimetypes(); -- cgit v1.2.3