From bdd1a19e5bddf75a79814692cef07513085bdf51 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Wed, 16 Dec 2020 06:38:12 -0600 Subject: finish P4 --- P4/util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'P4/util.c') diff --git a/P4/util.c b/P4/util.c index 07a18ef..652ba95 100644 --- a/P4/util.c +++ b/P4/util.c @@ -118,8 +118,7 @@ int get_request(int fd, char *filename) { } return -1; } - //Print header - printf("%s %s %s\n", get, filename, http); + if (strcmp(get, "GET")) { if (close(fd) == -1) { perror("Socket close error"); @@ -133,7 +132,7 @@ int get_request(int fd, char *filename) { perror("Socket close error"); return -15; } - printf("Not sure but bad\n"); + printf("Filename too long\n"); return -3; } //--END ERROR HANDLING-- @@ -143,7 +142,7 @@ int get_request(int fd, char *filename) { perror("Socket close error"); return -15; } - printf("Invalid directory!\n"); + printf("Invalid directory format\n"); return -4; } } -- cgit v1.2.3