httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: 403's not getting logged?
Date Fri, 09 May 2003 20:35:00 GMT

On Fri, 9 May 2003, Rich Bowen wrote:
> > > Now, it might be nice if it was more explicit, but at least this error
> > > message give a clue where to look.
> >
> > As long as we are taking all this trouble, we might as well special case
> > the EACCES error and return something more specific.
>
> +1

OK.  Here is a tested patch, but I'll wait for a couple explicit +1s
before committing.

I'm not sure if perhaps the message should say "... because search
permissions (chmod +x) are missing ..."  to help newbies.

Index: http_request.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
retrieving revision 1.168
diff -u -d -b -u -r1.168 http_request.c
--- http_request.c      3 Feb 2003 17:13:23 -0000       1.168
+++ http_request.c      9 May 2003 20:27:32 -0000
@@ -288,7 +288,12 @@
         }
         else {
 #if defined(EACCES)
-            if (errno != EACCES)
+            if (errno == EACCES)
+                ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+                            "access to %s failed because search "
+                            "permissions are missing on a component "
+                            "of the path", r->uri);
+            else
 #endif
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                             "access to %s failed", r->uri);


Mime
View raw message