Index: filed.c ================================================================== --- filed.c +++ filed.c @@ -580,12 +580,12 @@ /* Handle a single request from a client */ static void filed_handle_client(int fd, struct filed_http_request *request) { struct filed_fileinfo *fileinfo; ssize_t sendfile_ret; - size_t sendfile_len, sendfile_sent, sendfile_size; - off_t sendfile_offset; + size_t sendfile_size; + off_t sendfile_offset, sendfile_sent, sendfile_len; char *path; char *date_current, date_current_b[64]; int http_code; FILE *fp; @@ -756,13 +756,12 @@ if (sendfile_len == 0) { break; } } - /* XXX: TODO: Report status */ filed_log_msg("SEND_COMPLETE STATUS=%s FILE_FD=%i FD=%i BYTES=%llu BYTES_SENT=%llu", - "", + (sendfile_sent == request->headers.range.length) ? "OK" : "PARTIAL", fileinfo->fd, fd, (unsigned long long) request->headers.range.length, (unsigned long long) sendfile_sent );