On Thu, Jun 12, 2014 at 4:12 PM, Yann Ylavic <[email protected]> wrote: > @@ -191,6 +192,10 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t > if (thefile->flags & APR_FOPEN_XTHREAD) { > apr_thread_mutex_unlock(thefile->mutex); > } > + if (bytes_read) { > + *len = bytes_read; > + return APR_SUCCESS; > + }
Hm, I guess the following is better (forces *len = 0 on error with no data) :
+ *len = bytes_read;
+ if (*len) {
+ return APR_SUCCESS;
+ }
> return rv;
