Guest User

Untitled

a guest
Nov 18th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. if(strncmp(buf,"DELETE ", 4) != 0){ //check the command is DELETE /?
  2. write(clientfd, msg000, strlen(msg000));
  3. close(clientfd);
  4. continue;
  5. }
  6.  
  7. count = 0;
  8. for(i=4; i<strlen(buf);) {
  9. fileName[count++] = buf[i++];
  10. if (buf[i] == ' ') continue;
  11. }
  12. fileName[count] = '';
  13.  
  14. printf("ws: finename1=%sn", fileName);
  15.  
  16. if(strlen(fileName) == 0) {
  17. strcpy(fileName,"./index.html");
  18. }
  19. printf("ws: finename2=%sn", fileName);
  20. }
Add Comment
Please, Sign In to add comment