changeset 3612:f9a96545fee7

allow Destination URL without host
author Igor Sysoev <igor@sysoev.ru>
date Thu, 10 Jun 2010 08:17:16 +0000
parents 395ae91f7a5a
children 64bd39f03182
files src/http/modules/ngx_http_dav_module.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_dav_module.c	Tue Jun 08 19:33:53 2010 +0000
+++ b/src/http/modules/ngx_http_dav_module.c	Thu Jun 10 08:17:16 2010 +0000
@@ -535,6 +535,13 @@
         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) {