aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-17 10:05:14 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-17 10:05:14 -0600
commit185fc66157d28e1bc0d1def66e3ddbdd794a34e5 (patch)
tree32d1714ada8232dd9a4664af9054d133af79b81f /P3
parentDeal with stsah (diff)
downloadcsci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar.gz
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar.bz2
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar.lz
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar.xz
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.tar.zst
csci4061-185fc66157d28e1bc0d1def66e3ddbdd794a34e5.zip
fix strcmp
Diffstat (limited to 'P3')
-rw-r--r--P3/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/P3/server.c b/P3/server.c
index e4aeef4..00a0d0e 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -92,13 +92,13 @@ char* getContentType(char * mybuf) {
printf("Filetype not found. Exiting\n");
exit(-1);
}
- else if ((!strcmp((ext + 1), "htm")) || (!strcmp((ext + 1), "html"))) {
+ else if ((strcmp((ext + 1), "htm") == 0) || (strcmp((ext + 1), "html") == 0)) {
return "text/html";
}
- else if (!strcmp((ext + 1), "jpg")) {
+ else if (strcmp((ext + 1), "jpg") == 0) {
return "image/jpeg";
}
- else if (!strcmp((ext + 1), "gif")) {
+ else if (strcmp((ext + 1), "gif") == 0) {
return "image/gif";
}
else {