httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] mod_dir fixup cleanup
Date Sat, 25 Jan 1997 15:24:42 GMT
+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;
>   }




Mime
View raw message