summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-06-10 08:17:16 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-06-10 08:17:16 +0000
commit34cd1cc6560c2f36c4b7ae542184e488c1768756 (patch)
tree5cc049116008f2a716c4fab6c413475ec127bf73
parentf0bf9956dc976ff0c3ec2c36b66afa8208c38b9f (diff)
downloadnginx-34cd1cc6560c2f36c4b7ae542184e488c1768756.tar.gz
nginx-34cd1cc6560c2f36c4b7ae542184e488c1768756.tar.bz2
allow Destination URL without host
-rw-r--r--src/http/modules/ngx_http_dav_module.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index 3d34a4009..0761c1654 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -535,6 +535,13 @@ ngx_http_dav_copy_move_handler(ngx_http_request_t *r)
return NGX_HTTP_BAD_REQUEST;
}
+ p = dest->value.data;
+ /* there is always '\0' even after empty header value */
+ if (p[0] == '/') {
+ last = p + dest->value.len;
+ goto destination_done;
+ }
+
len = r->headers_in.server.len;
if (len == 0) {