* [PATCH] http_dav: log 500 errors from DELETE requests
@ 2015-02-05 21:56 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-02-05 21:56 UTC (permalink / raw)
To: cmogstored-public; +Cc: Eric Wong
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-05 21:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 21:56 [PATCH] http_dav: log 500 errors from DELETE requests Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/cmogstored.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).