diff src/http/modules/ngx_http_dav_module.c @ 3612:f9a96545fee7

allow Destination URL without host
author Igor Sysoev <igor@sysoev.ru>
date Thu, 10 Jun 2010 08:17:16 +0000
parents 84905c7b2aa7
children 59b99f217c6d
line wrap: on
line diff
--- 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_
         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) {