I've been trying to solve the "validate request-line" in pset6, but there are some things that I don't understand well. Here is how I am interpreting the problem and the "what to do" explanations:
First, I need to work with all the request line and:
1 - check if the absolute path starts with '/';
2 - check if the request line doesn't contain ' " ' (or is it just the query, not all the request line?)
If either one or both of these are false, then return "400 bad request".
Then come the individual requests and one of them is:
3 - if request-target does not begin with '/', respond with 501 Not Implemented
Here is another thing I don't get. What is the difference of checks 1 and 3? Are they not the same error? Isn't the request target the absolute path + the query, so am I not analysing the same thing? Why two different errors?
And one more thing, am I thinking correctly to first analyze the request line to check for the 400 bad request and then move on to the individual requests? Or should I deal with this problem in a more integrated way?
Thanks for all the help!