aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_dav_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-04-22 17:15:42 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-04-22 17:15:42 +0000
commit3ec15dd090e45c6a767407f758e1765c146b2bb4 (patch)
treeb62fd110b8a99311e1f8382c161cfeecd69505a1 /src/http/modules/ngx_http_dav_module.c
parentfa7d06ee4f31823f65c5aecea3a273940770bc9d (diff)
downloadnginx-3ec15dd090e45c6a767407f758e1765c146b2bb4.tar.gz
nginx-3ec15dd090e45c6a767407f758e1765c146b2bb4.zip
use lstat() for WebDAV DELETE, COPY, and MOVE to handle symlinks
Diffstat (limited to 'src/http/modules/ngx_http_dav_module.c')
-rw-r--r--src/http/modules/ngx_http_dav_module.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index 2948eec06..4b561105c 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -325,13 +325,13 @@ ok:
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http delete filename: \"%s\"", path.data);
- if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
+ if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
err = ngx_errno;
rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND;
return ngx_http_dav_error(r->connection->log, err,
- rc, ngx_file_info_n, path.data);
+ rc, ngx_link_info_n, path.data);
}
if (ngx_is_dir(&fi)) {
@@ -358,7 +358,7 @@ ok:
/*
* we do not need to test (r->uri.data[r->uri.len - 1] == '/')
- * because ngx_file_info("/file/") returned NGX_ENOTDIR above
+ * because ngx_link_info("/file/") returned NGX_ENOTDIR above
*/
depth = ngx_http_dav_depth(r, 0);
@@ -685,12 +685,12 @@ overwrite_done:
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http copy to: \"%s\"", copy.path.data);
- if (ngx_file_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
+ if (ngx_link_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
err = ngx_errno;
if (err != NGX_ENOENT) {
return ngx_http_dav_error(r->connection->log, err,
- NGX_HTTP_NOT_FOUND, ngx_file_info_n,
+ NGX_HTTP_NOT_FOUND, ngx_link_info_n,
copy.path.data);
}
@@ -719,9 +719,9 @@ overwrite_done:
dir = ngx_is_dir(&fi);
}
- if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
+ if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
return ngx_http_dav_error(r->connection->log, ngx_errno,
- NGX_HTTP_NOT_FOUND, ngx_file_info_n,
+ NGX_HTTP_NOT_FOUND, ngx_link_info_n,
path.data);
}