]> git.kaiwu.me - nginx.git/commitdiff
allow Destination URL without host
authorIgor Sysoev <igor@sysoev.ru>
Thu, 10 Jun 2010 08:17:16 +0000 (08:17 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 10 Jun 2010 08:17:16 +0000 (08:17 +0000)
src/http/modules/ngx_http_dav_module.c

index 3d34a4009844f26f3d1c8203134046425fe88d75..0761c1654fd15dbc69715a8487190ea68f85b6e0 100644 (file)
@@ -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) {