Hopefully this is the final problem with PSET6. I have completed all 4 functions and the program is running on the first try, meaning when I am visiting one of the pages, for example cat.jpg, the picture loads without any problem. However, when i am going back and I'm trying to visit another page, i.e. /index.html I am getting 404 error. Bellow i have the results from my terminal.
Using /home/ubuntu/workspace/pset6/public for server's root
Listening on port 8080
GET / HTTP/1.1
HTTP/1.1 200 OK
GET /test HTTP/1.1
HTTP/1.1 301 Moved Permanently
GET /test/ HTTP/1.1
HTTP/1.1 200 OK
GET /test/index.html HTTP/1.1
HTTP/1.1 200 OK
GET /favicon.ico HTTP/1.1
HTTP/1.1 404 Not Found
GET /cat.html HTTP/1.1
HTTP/1.1 404 Not Found
Using check50 i pass all but 3 tests:
:) Requesting test.js returns 200, text/javascript, and correct file
:) Requesting hello.php returns 200, text/html, and correct output
:( Requesting hello.php? returns 200, text/html, and correct output
\ expected output, not an exit code of 0
:( Requesting hello.php?name=Alice returns 200, text/html, and correct output
\ expected output, not an exit code of 0
:) Requesting /test redirects to /test/
:( Requesting /test/ outputs /test/index.html
:) Requesting directory containing index.php outputs index.php
Please let me know if anyone had a similar problem and what function was causing the program to crush or can point me to the right direction? Thanks in advance!