Fixed resetConnection()

This commit is contained in:
Nate Choe
2022-01-22 20:22:22 -06:00
parent ad06bbc7be
commit fbb3a4e8cd
3 changed files with 4 additions and 4 deletions

View File

@@ -63,13 +63,13 @@ static void readResponse(Connection *conn, char *path) {
fclose(file);
sendConnection(conn,
"HTTP/1.1 200 OK\r\n"
"Content-Type: text/html; charset=UTF-8\r\n"
"Server: swebs/0.1\r\n"
"Content-Length: %ld\r\n"
"\r\n", len
);
write(conn->fd, data, len);
free(data);
fsync(conn->fd);
}
int sendResponse(Connection *conn, Sitefile *site) {