From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: cmogstored-public@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C1A151F7C2; Thu, 5 Feb 2015 21:56:47 +0000 (UTC) From: Eric Wong To: cmogstored-public@bogomips.org Cc: Eric Wong Subject: [PATCH] http_dav: log 500 errors from DELETE requests Date: Thu, 5 Feb 2015 21:56:46 +0000 Message-Id: <1423173406-21936-1-git-send-email-e@80x24.org> List-Id: 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) -- EW