From: Igor Sysoev Date: Thu, 10 Jun 2010 08:17:16 +0000 (+0000) Subject: allow Destination URL without host X-Git-Tag: release-0.8.41~4 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=34cd1cc6560c2f36c4b7ae542184e488c1768756;p=nginx.git allow Destination URL without host --- 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) {