0

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

2
  • Based on your previous post, your test file is declaring line thus char* line = "GET /hello.php?q=gilbert HTTP/1.1\r\n";. But server is failing on this request GET / HTTP/1.1 (with the unseen CRLF, of course). Assuming your test program is still parse, try changing line 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). Commented Jul 5, 2016 at 13:08
  • There is a problem in load, too. This post (the "load" section) when you need it. Commented Jul 5, 2016 at 13:24

0

You must log in to answer this question.

Browse other questions tagged .