Your idea is good; however your patch has two flaws...
if r->finfo.filetype is neither APR_DIR nor APR_REG, then what? Whoops.
also I believe your change to validating the symlink status is not a valid
change. Please explain since that has little to do with the proposed problem
and solution.

> if r->finfo.filetype is neither APR_DIR nor APR_REG, then what? Whoops.
The patch corrects an optimization. In other words, the code is supposed to
work correctly even without the optimization--the entire optimization could be
removed and the code should still function correctly. The patch corrects the
optimization so that it handles and cases r->finfo.filetype == APR_DIR and
r->finfo.filetype == APR_REG. If r->finfo.filetype is neither APR_DIR nor
APR_REG, then the optimization simply falls through and executes the code below,
which again is intended to correctly handle all cases. So the answer to your
question is: it does whatever it would do if the optimization did not exists.
> also I believe your change to validating the symlink status is not a valid
> change. Please explain since that has little to do with the proposed problem
> and solution.
I don't understand what those two sentences say. Please elaborate.

This is ASF Bugzilla: the Apache Software Foundation bug system. In case
of problems with the functioning of ASF Bugzilla, please contact
bugzilla-admin@apache.org.
Please Note: this e-mail address is only for reporting problems
with ASF Bugzilla. Mail about any other subject will be silently
ignored.