summaryrefslogtreecommitdiff
path: root/Year_3/TSDWL/webserver
diff options
context:
space:
mode:
Diffstat (limited to 'Year_3/TSDWL/webserver')
-rw-r--r--Year_3/TSDWL/webserver/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Year_3/TSDWL/webserver/server.c b/Year_3/TSDWL/webserver/server.c
index ff9a5bf..15c8117 100644
--- a/Year_3/TSDWL/webserver/server.c
+++ b/Year_3/TSDWL/webserver/server.c
@@ -278,7 +278,10 @@ read_file(char* root, request_t* request, int client)
sprintf(buffer, "Content-Length: %ld\n", sb.st_size);
write(client, buffer, strlen(buffer));
- sprintf(buffer, "Last-Modified: %s\n", ctime(&sb.st_mtime));
+ sprintf(buffer, "Last-Modified: %s", ctime(&sb.st_mtime));
+ write(client, buffer, strlen(buffer));
+
+ sprintf(buffer, "Connection: close\n\n");
write(client, buffer, strlen(buffer));
}