fix(http): fix serving large file

This commit is contained in:
2025-12-01 03:55:57 +01:00
parent 807cb5f862
commit b52483abaa
4 changed files with 80 additions and 105 deletions

View File

@@ -8,6 +8,6 @@ typedef struct mimetype {
const char *type;
} mimetype;
int http_get_content_type(char *location_path, char *content_type);
int http_get_content_type(const char *location_path, char *content_type);
#endif

View File

@@ -2,12 +2,6 @@
#define CWS_RESPONSE_H
#include "http/request.h"
#include <sys/types.h>
size_t http_simple_html(char **response, cws_http_status_e status, char *title, char *description);
size_t http_response_builder(char **response, cws_http_status_e status, char *content_type,
char *body, size_t body_len_bytes);
void cws_http_send_response(cws_request_s *request, cws_http_status_e status);