Mercurial > hg > nginx
changeset 7601:c1a7d3672653
Dav: fixed Location in successful MKCOL response.
Instead of reducing URI length to not include the terminating '\0'
character in 6ddaac3e0bf7, restore the terminating '/' character.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 16 Dec 2019 15:19:01 +0300 |
parents | 3939483cd1b5 |
children | b399246ea45d |
files | src/http/modules/ngx_http_dav_module.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_dav_module.c Thu Dec 05 19:38:06 2019 +0300 +++ b/src/http/modules/ngx_http_dav_module.c Mon Dec 16 15:19:01 2019 +0300 @@ -513,7 +513,6 @@ } *(p - 1) = '\0'; - r->uri.len--; ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http mkcol path: \"%s\"", path.data); @@ -521,6 +520,8 @@ if (ngx_create_dir(path.data, ngx_dir_access(dlcf->access)) != NGX_FILE_ERROR) { + *(p - 1) = '/'; + if (ngx_http_dav_location(r, path.data) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR; }