You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/01/25 16:24:42 UTC

Re: [PATCH] mod_dir fixup cleanup

+1

> The below patch makes the error message a bit more standard and doesn't
> print it if the reason for stat failing was EACCES.  Should go in before
> the beta goes out.
> 
> Index: http_request.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_request.c,v
> retrieving revision 1.39
> diff -c -r1.39 http_request.c
> *** 1.39	1997/01/20 09:30:50
> --- http_request.c	1997/01/25 08:02:10
> ***************
> *** 208,217 ****
>   	} 
>   #if defined(ENOENT) && defined(ENOTDIR)
>   	else {
> ! 	    log_printf(r->server, "access to %s failed for client; unable to determine if index file exists (stat() returned unexpected error[%d])", r->filename, errno);
>   	    return HTTP_FORBIDDEN;
>   	}
> ! #endif
>       }
>       return OK;
>   }
> --- 208,224 ----
>   	} 
>   #if defined(ENOENT) && defined(ENOTDIR)
>   	else {
> ! #if defined(EACCES)
> ! 	    if (errno != EACCES) 
> ! #endif 
> ! 	    log_printf(r->server, 
> ! 	       "access to %s failed for %s, reason: stat: %s (errno = %d)",
> ! 	       r->uri, get_remote_host(r->connection, r->per_dir_config,
> ! 	       REMOTE_NAME), strerror(errno), errno);
> ! 
>   	    return HTTP_FORBIDDEN;
>   	}
> ! #endif /* ENOENT && ENOTDIR */
>       }
>       return OK;
>   }