I'm having trouble getting the web browser to load the files I'm attempting to access. I know I've correctly identified 'path' and when I pull up the web browser I get the 200 OK response but nothing appears on the screen. I'm thinking the problem lies somewhere in the 'respond to client' todo. Below is my code. Is there something I'm doing wrong here?
dprintf(cfd, "HTTP/1.1 200 OK\r\n");
dprintf(cfd, "Connection: close\r\n");
dprintf(cfd, "Content-Length: %i\r\n", length);
dprintf(cfd, "Content-Type: %s\r\n", type);
write(cfd, body, length);
This problem set is pretty infuriating simply because the hang up I'm dealing with is on the web browser end and there is simply no way for me to debug this through gdb. Please let me know what's wrong before I throw my computer out the window!