I've been at Pset6 for ages now, and I'm stuck at this little tidbit here:
} else if(versioning == true) {
strcat(httpVersion, s);
if(strncmp(httpVersion, "\"", 1) == 0) {
error(400);
abs_path = NULL;
method = NULL;
httpVersion = NULL;
return false;
}
}
}
if(strncmp(httpVersion, "HTTP/1.1\r\n", strlen(httpVersion)) == 0) {
return true;
} else {
error(505);
abs_path = NULL;
method = NULL;
httpVersion = NULL;
return false;
}
The only two frowns I have in check50 are the following:
:( 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..."
I know where the problem roughly lies, but I have no idea how to fix it... It would be great if I could get some tips on how to go on.