diff options
| author | ame <[email protected]> | 2024-09-30 02:17:37 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-09-30 02:17:37 -0500 |
| commit | f648ac9db35f49f3dbd7373cc230f680c55cc04a (patch) | |
| tree | 2a9fafd40359419d36504b55e6041a9fdda23bc6 /src/net/util.h | |
| parent | 1cc24fda87c3e8df90a5ea2d526ce39adf4a7648 (diff) | |
| parent | fe33c0e979ebfc41c3eb9f561589f0d5d8810aaf (diff) | |
what
Diffstat (limited to 'src/net/util.h')
| -rw-r--r-- | src/net/util.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/util.h b/src/net/util.h index 98d4d93..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 * @@ -32,7 +34,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 +42,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); @@ -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(); |
