0

For the last error of :( Requesting hello.php? returns 200, text/html, and correct output

Should the parse function remove the last question mark, return 400, or should indexes handle it and return "text/x-php";

I've tried a few but didn't feel right trying to make it work without understanding the goal

Thanks

1 Answer 1

1

From the instructions:

absolute-path [ "?" query ]
whereby absolute-path (which will not contain ?) must start with / and might optionally be followed by a ? followed by a query, which may not contain ".

Notice, the "?" is inside the [ optional clause ], so you may assume that it is not part of absolute-path.

Further:

Store at the address in query the query substring from request-target. If that substring is absent (even if a ? is present), then query should be "",

You might try sending that request (hello.php?) to the staff's version of server using a browser or curl to see the expected result. There should be no special handling in indexes (or lookup).

BTW excellent strategy, understanding the goal before undertaking the work. Usually saves lots of time and heartache.

2
  • I appreciate the response, it helps clarify the situation. I think i reread that page so often it got muddled in the mind. ty ty Commented Jul 12, 2016 at 17:00
  • Trying not to add senseless comments like thank you... BUT i spent almost a month on this due to work.. an hour after your clarification both check50 test pass THANK YOU... Commented Jul 12, 2016 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .