diff options
Diffstat (limited to 'http_dav.c')
-rw-r--r-- | http_dav.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -15,7 +15,7 @@ void mog_http_delete(struct mog_fd *mfd, char *buf) char *path; if (mfd->fd_type == MOG_FD_TYPE_HTTPGET) { - mog_http_resp(http, "405 Method Not Allowed", true); + mog_http_resp(mfd, "405 Method Not Allowed", true); return; } @@ -26,7 +26,7 @@ void mog_http_delete(struct mog_fd *mfd, char *buf) rc = mog_unlink(http->svc, path); if (rc == 0) { - mog_http_resp(http, "204 No Content", true); + mog_http_resp(mfd, "204 No Content", true); return; } @@ -35,14 +35,14 @@ void mog_http_delete(struct mog_fd *mfd, char *buf) case EISDIR: case EACCES: forbidden: - mog_http_resp(http, "403 Forbidden", true); + mog_http_resp(mfd, "403 Forbidden", true); return; case ENOENT: - mog_http_resp(http, "404 Not Found", true); + mog_http_resp(mfd, "404 Not Found", true); return; } PRESERVE_ERRNO(do { - mog_http_resp(http, "500 Internal Server Error", true); + mog_http_resp(mfd, "500 Internal Server Error", true); } while(0)); } @@ -52,7 +52,7 @@ void mog_http_mkcol(struct mog_fd *mfd, char *buf) char *path; if (mfd->fd_type == MOG_FD_TYPE_HTTPGET) { - mog_http_resp(http, "405 Method Not Allowed", true); + mog_http_resp(mfd, "405 Method Not Allowed", true); return; } path = mog_http_path(http, buf); @@ -64,7 +64,7 @@ void mog_http_mkcol(struct mog_fd *mfd, char *buf) * this. */ if (path) - mog_http_resp(http, "400 Bad Request", true); + mog_http_resp(mfd, "400 Bad Request", true); else /* path traversal attack */ - mog_http_resp(http, "403 Forbidden", true); + mog_http_resp(mfd, "403 Forbidden", true); } |