in my work when i try ./server it show me stopping server then i use printf in start function to know what wrong and i know if i type ./server puplic start function in root=realpath(path,NULL) show root ==NULL i know because error message i print in this case is no root but i don't understand why i make my lookup better and my parse but still same problem a make my lood with unsigned char and use fread not getc and ithink there is nothing wrong with my load function or parse parse pass all check50 server1 and in parse my requestline is array[limitrequestline] so it contain all request line and in lookup i use strncasecmp and index i think it's perfect here the check50
With this collection of check50/server fails I suggest these things.
- Review your lookup function and make sure it matches this part of the specification:
image/jpeg (not image/jpg) for any file whose path ends in .jpg (or any capitalization thereof)
A mistake there will cause the two cat.jpg failures.
- Review your parse function. There is a problem if there is a '?' with no query following. The
expected output, not an exit code of 0usually indicates a seg fault. To test that particular call (/hello.php?), you must use a curl request and not a browser request. All modern browsers strip a trailing '?', so the parse function will not have a '?' to process. A curl request like
http://localhost:8080/hello.php?should duplicate the segmentation fault that check50 reports.