Commit 9048b3d2 authored by Deucе's avatar Deucе 👌🏾
Browse files

post_to_file() shouldn't close the file since it didn't open it.

parent e3331b08
Pipeline #1625 passed with stage
in 11 minutes and 46 seconds
......@@ -6096,12 +6096,10 @@ BOOL post_to_file(http_session_t *session, FILE*fp, size_t ch_len)
bytes_read=recvbufsocket(session,buf,(ch_len-k)>sizeof(buf)?sizeof(buf):(ch_len-k));
if(!bytes_read) {
send_error(session,__LINE__,error_500);
fclose(fp);
return(FALSE);
}
if(fwrite(buf, bytes_read, 1, fp)!=1) {
send_error(session,__LINE__,error_500);
fclose(fp);
return(FALSE);
}
k+=bytes_read;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment