that apr_file_read() has guaranteed len == 0 at EOF for a looong time;
and avoid a redundant call to write(,,0) when EOF is reached.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102934
13f79535-47bb-0310-9956-
ffa450edef68
"Could not read input file");
}
- /* write any bytes that were read (applies to APR_EOF, too) */
+ if (status == APR_EOF)
+ break;
+
+ /* write any bytes that were read */
if (apr_file_write_full(outf, pbuf->buf, len, NULL) != APR_SUCCESS) {
int save_errno = errno;
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not write output file");
}
-
- if (status == APR_EOF)
- break;
}
apr_file_close(inf);