The arguments 2 and 3 should be exchanged. This is a common mistake, and, usually, it does not matter, but maybe it matters here.
Instead ofWriteCode:written_bytes = fwrite((parsed_request->body), 1, (size_t)(parsed_request->content_length), request_file);Check the value in parsed_request->content_length.Code:written_bytes = fwrite((parsed_request->body), (size_t)(parsed_request->content_length), 1, request_file);
Is it the size of parsed_request->body?
N.B. Write your code between [code] and [/code]. It will be placed in a nice rectangle and spaces at the beginning of lines will be saved.
EDIT: Excuse-me, forget what I have said.




Reply With Quote