Stuff
This commit is contained in:
@@ -264,7 +264,6 @@ static void handle_put_request(FILE *conn, HTTPRequest *restrict req) {
|
||||
if (content_length < 0) {
|
||||
write_audit_log_entry(req, 400);
|
||||
send_simple_response(conn, 400);
|
||||
fclose(conn);
|
||||
return;
|
||||
}
|
||||
char temp_file[] = "temp_fileXXXXXX";
|
||||
@@ -286,6 +285,12 @@ static void handle_put_request(FILE *conn, HTTPRequest *restrict req) {
|
||||
close(temp_fd);
|
||||
unlink(temp_file);
|
||||
return;
|
||||
} else if (feof(conn)) {
|
||||
write_audit_log_entry(req, 400);
|
||||
send_simple_response(conn, 400);
|
||||
close(temp_fd);
|
||||
unlink(temp_file);
|
||||
return;
|
||||
}
|
||||
content_length -= read_size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user