From 185fc66157d28e1bc0d1def66e3ddbdd794a34e5 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 17 Nov 2020 10:05:14 -0600 Subject: fix strcmp --- P3/server.c | 6 +++--- 1 file 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 { -- cgit v1.2.3