From 3ad004442291b5cb41f859310a28560ffaa15f77 Mon Sep 17 00:00:00 2001 From: Miley Li <h.li68@student.unimelb.edu.au> Date: Fri, 20 Apr 2018 00:07:29 +1000 Subject: [PATCH] Update server.c --- server.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server.c b/server.c index bb18609..8f6a990 100644 --- a/server.c +++ b/server.c @@ -131,13 +131,7 @@ void* httpRequest(void* data) filePath = strpbrk(fl2, "/"); - - /* - tmp_ptr1=strpbrk(req,"/"); // Breaks the line and processes the string which has "/". - tmp_ptr2=strtok(tmp_ptr1," "); // Removes blankspces if any - filePath=strpbrk(tmp_ptr2,"/");// Copying the file loaction that the client want to access and break at / and copy after that - strcpy(tmp_ptr3,tmp_ptr2);//coping tmp_ptr2 value to tmp_ptr3 - */ + // When GET request sends "/" we map to "/index.html" if (strcmp(filePath,"/")==0){ strcpy(filePath,strcat(doc_root,"/index.html")); -- GitLab