aboutsummaryrefslogtreecommitdiffstats
path: root/P4/util.c
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-12-16 06:38:12 -0600
committerMatt Strapp <strap012@umn.edu>2020-12-16 06:38:12 -0600
commitbdd1a19e5bddf75a79814692cef07513085bdf51 (patch)
treed3182012fdbf00c69fadee03fc0a7538099776b8 /P4/util.c
parentadd temporary header print (diff)
downloadcsci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar.gz
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar.bz2
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar.lz
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar.xz
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.tar.zst
csci4061-bdd1a19e5bddf75a79814692cef07513085bdf51.zip
finish P4
Diffstat (limited to '')
-rw-r--r--P4/util.c7
1 files changed, 3 insertions, 4 deletions
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;
}
}