I have spent several days trying to implement pset6's server.
I get the following output when I test it(I haven't yet done indexes):
GET / HTTP/1.1
Segmentation fault
I have tried debugging my code (unsuccessfully) using a test file and gdb but can't find the problem.
Other questions are too specific to people's own code, so it is very difficult to get help from that.
Functions implemented so far: http://pastebin.com/Le63C34U
char* line = "GET /hello.php?q=gilbert HTTP/1.1\r\n";
. But server is failing on this requestGET / HTTP/1.1
(with the unseen CRLF, of course). Assuming your test program is still parse, try changingline
to the failing request and see if that doesn't get you (and gdb) to the exact line that is seg faulting. (The problem is in parse).