remove redundant checks for tempfile chunk reuse c->file.is_temp is only set if c->type == FILE_CHUNK is also true The test for (0 == c->offset) is historical. Before the temporary files were opened O_APPEND (or written to using pwrite()), the file offset may have changed via lseek() if lighttpd had started reading the file to send to the client. To avoid this, the (0 == c->offset) check was used as a quick check to avoid continuing to write to a temporary file that lighttpd had begun to read.
1 changed files with 1 additions and 6 deletions
Reference in new issue