When I click on cat.jpg I get the correct image and my server returns "HTTP/1.1 200 OK
" Check50 gives me an error, though. When I step through the program in gdb and print *content just before returning from the function, I get
$7 = (BYTE *) 0x6084d0 "\377\330\377", <incomplete sequence \340>
The same does not happen with cat.html and check50 tells me that is ok. This is my code:
bool load(FILE* file, BYTE** content, size_t* length)
{
*length = 0;
*content = NULL;
if(fseek(file, 0, SEEK_END) == 0)
{
fseek(file, 0, SEEK_END);
*length = ftell(file);
BYTE* info = malloc(*length);
fseek(file, 0, SEEK_SET);
fread(info, 1, *length,file);
*content = info;
return true;
}
//return false;
return false;
}
I can't find anything useful about "incomplete sequence".