httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r491297 - /httpd/httpd/trunk/server/request.c
Date Sat, 30 Dec 2006 20:07:15 GMT
Author: rpluem
Date: Sat Dec 30 12:07:14 2006
New Revision: 491297

URL: http://svn.apache.org/viewvc?view=rev&rev=491297
Log:
* If APR_FINFO_NAME is added to the list of wanted information, apr_stat
  always returns APR_INCOMPLETE on Unix platforms in the case that the
  call to the native stat / lstat did not fail. So we can safely assume
  that the stat / lstat call has been successful in this case.

Modified:
    httpd/httpd/trunk/server/request.c

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?view=diff&rev=491297&r1=491296&r2=491297
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Sat Dec 30 12:07:14 2006
@@ -556,7 +556,14 @@
                 rv = apr_stat(&thisinfo, r->filename,
                               APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
                               r->pool);
-                if (rv != APR_SUCCESS) {
+                /*
+                 * APR_INCOMPLETE is as fine as result as APR_SUCCESS as we
+                 * have added APR_FINFO_NAME to the wanted parameter of
+                 * apr_stat above. On Unix platforms this means that apr_stat
+                 * is always going to return APR_INCOMPLETE in the case that
+                 * the call to the native stat / lstat did not fail.
+                 */
+                if ((rv != APR_INCOMPLETE) && (rv != APR_SUCCESS)) {
                     /*
                      * This should never happen, because we did a stat on the
                      * same file, resolving a possible symlink several lines



Mime
View raw message