add some debug logs

This commit is contained in:
Nayan
2025-05-08 21:25:26 -04:00
parent e956ef0681
commit b52ce7dd0c
3 changed files with 5 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#include "request_handler.h"
void handle_request(char* request, int length, http_response* response) {
log_message(LOG_DEBUG, "Handling request");
// Parse request into struct
http_request* req = create_http_request();
parse_http_request(request, length, req);
@@ -28,6 +29,7 @@ void handle_request(char* request, int length, http_response* response) {
}
void parse_http_request(char* request, int length, struct http_request* req) {
log_message(LOG_DEBUG, "Parsing request");
// Get the end of the first line
char* request_line_end = strstr(request, "\r\n");
if (request_line_end == NULL) {