Currently working on pset6 server.c. All of my pages load properly except for one thing: when I submit a name in the text box from hello.html, the query properly shows up in the URL, but the hello.html page content (i.e. the blank text box) loads instead of the hello.php page content. The correct output is a page that says "hello, david" that is generated by the hello.php file.
Using curl, I see "Content-Type: text/html" after submitting curl -i http://localhost:8080/hello.php?name=david
.
When I printf my abs_path and query variables at the end of my parse function, I get the following after requesting hello.html then submitting a name in the text box:
Confusingly, when I request hello.php directly from the home page, the hello.php page properly loads:
I've been stumped for a while. Any tips on where the issue is stemming from?
Potentially useful update: When I enter "https://ide50-davidv.cs50.io/hello.php?name=david" in the URL while running GDB, I get a 301 error and get redirected to the home page ("/"):
GET /hello.php?name=david HTTP/1.1
abs_path: /hello.php
query: name=david
HTTP/1.1 301 Moved Permanently