Skip to main content
8 events
when toggle format what by license comment
Apr 13, 2017 at 12:50 history edited CommunityBot
replaced http://cs50.stackexchange.com/ with https://cs50.stackexchange.com/
Nov 7, 2016 at 13:16 comment added N. Kat YES! Thank you very much. Now it works! Before reading your second comment I've wrote second indexes funtion. The other thing I've discovered using GDB is that in first function I didn't check for extra slash '/'. So my paths looked like this linkphp = 0x6070e0 "/home/ubuntu/workspace/pset6/public/test//index.php" linkhtml = 0x607120 "/home/ubuntu/workspace/pset6/public/test//index.html" Even if they have double slashes '//' it still works. In second function I've implemented that check. I'll post them in my second answer. Both functions work for me.
Nov 7, 2016 at 11:23 history edited Yuri Laguardia CC BY-SA 3.0
added 8 characters in body
Nov 7, 2016 at 11:00 comment added Yuri Laguardia Ok @N.Kat. I have updated the answer to give some hints about the final problem. And know this: check50 is not testing YOUR directories. It's testing THE STAFF's directories using your server.c file
Nov 7, 2016 at 11:00 history edited Yuri Laguardia CC BY-SA 3.0
complementing answer
Nov 7, 2016 at 10:07 comment added N. Kat Thank you for advice! I,ve changed code to use fgetc. Now I have only one error, but there is now index.php in any directory. :( Requesting directory containing index.php outputs index.php \ expected output, but not "HTTP/1.1 200 OK\r\nContent-Type: text/h..."
Nov 7, 2016 at 9:45 vote accept N. Kat
Nov 6, 2016 at 15:00 history answered Yuri Laguardia CC BY-SA 3.0