From 10ae48e0880fc76d1f2044f80e20004491801663 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 Feb 2015 21:52:08 +0000 Subject: http_dav: log 500 errors from DELETE requests Errors on failed unlink can be a prelude to a bigger problem, so log it locally ourselves even if the tracker will notice it. This commit was tested manually by setting up cmogstored to point to a read-only mount point on my system and attempting a DELETE request on it. --- http_dav.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http_dav.c b/http_dav.c index 8487e13..ad7c80d 100644 --- a/http_dav.c +++ b/http_dav.c @@ -46,6 +46,8 @@ forbidden: PRESERVE_ERRNO(do { mog_http_resp(mfd, "500 Internal Server Error", true); } while(0)); + syslog(LOG_ERR, "Failed to unlink %s (in %s): %m", + path, http->svc->docroot); } void mog_http_mkcol(struct mog_fd *mfd, char *buf) -- cgit v1.2.3-24-ge0c7