I know that when lookup returns NULL when called, error 501 should appear and that's what I did in lookup's implementation. If the extension of the file is none of the ones mentioned in the pset's specs, return NULL. I don't know why I get the first error. For the second error, I have no idea how to make sure the file exists.
:) server.c exists
:) server compiles
:) HTTP/1.0 returns error code 505
:) Method of 'abcGET' returns error code 405
:) Method of 'GETabc' returns error code 405
:) request-target without starting '/' returns error code 501
:) request-target of abc/hello.php returns error code 501
:( Requesting cat.exe returns error code 501
\ expected output, but not "HTTP/1.1 505 HTTP Version Not Supported..."
:( Requesting non-existant file returns error code 404
\ expected output, but not "HTTP/1.1 505 HTTP Version Not Supported..." :) Requesting request-target with " returns error code 400
:) Two spaces after GET returns error code
:) A space within the request target returns error code
:) Two spaces before HTTP/1.1 returns error code
ps: I haven't implemented the query part in parse yet.