On 12/29/2006 06:17 AM, Paul Querna wrote:

> 
> Ya, I'm not sure why that is happening either.
> 
> This works:
> http://archive.apache.org/dist/
> 
> And so does this:
> http://archive.apache.org/index.html
> 
> But this:
> http://archive.apache.org/
> 
> Does not.  So, the error log has:
> [Fri Dec 29 05:10:00 2006] [error] [client 66.225.25.189] (70008)Partial
> results are valid but processing is incomplete: access to /index.html failed
> 
> It seems like the cause must be something broken in httpd trunk.
> 
> I think this commit did it:
> http://svn.apache.org/viewvc?view=rev&revision=425394

I think we should not shoot the messenger here :-):

--- httpd/httpd/trunk/server/request.c  2006/07/25 13:33:05     425393
+++ httpd/httpd/trunk/server/request.c  2006/07/25 13:40:32     425394
@@ -553,9 +553,22 @@
              * check.
              */
             if (!(opts & OPT_SYM_LINKS)) {
-                apr_stat(&thisinfo, r->filename,
-                         APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
-                         r->pool);
+                rv = apr_stat(&thisinfo, r->filename,
+                              APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
+                              r->pool);
+                if (rv != APR_SUCCESS) {
+                    /*
+                     * This should never happen, because we did a stat on the
+                     * same file, resolving a possible symlink several lines
+                     * above. Therefore do not make a detailed analysis of rv
+                     * in this case for the reason of the failure, just bail 
out
+                     * with a HTTP_FORBIDDEN in case we hit a race condition
+                     * here.
+                     */
+                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+                                  "access to %s failed", r->uri);
+                    return r->status = HTTP_FORBIDDEN;
+                }
                 if (thisinfo.filetype == APR_LNK) {
                     /* Is this a possibly acceptable symlink? */
                     if ((res = resolve_symlink(r->filename, &thisinfo,


I guess we should have good reasons to continue if apr_stat does not return 
APR_SUCCESS, especially
since we try to process the results of this apr_stat call afterwards 
(thisinfo.filetype == APR_LNK).

"Partial results are valid but processing is incomplete" seems to be the OS 
error message
to me. To be honest I am not quite sure what it wants me to tell. On which OS 
did this happen?

Regards

RĂ¼diger

P.S: +1 to the patch improving the error message by adding r->filename to it.

Reply via email to