diff --git a/server.c b/server.c index bb186091c380a4e59c2479a297f24c53de574cfa..8f6a9903c82eea98f3f7180dfed5a2c8a3704d55 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"));