diff options
author | Matt Strapp <strap012@umn.edu> | 2020-12-16 06:38:12 -0600 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-12-16 06:38:12 -0600 |
commit | bdd1a19e5bddf75a79814692cef07513085bdf51 (patch) | |
tree | d3182012fdbf00c69fadee03fc0a7538099776b8 /P4/util.c | |
parent | add temporary header print (diff) | |
download | csci4061-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; } } |