diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2019-12-16 15:19:01 +0300 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2019-12-16 15:19:01 +0300 |
| commit | 6dc0c880e5b94dc507795369196dec5c2f9d2cc2 (patch) | |
| tree | 508f02179eb9553013c824a67d65b0c2ef96c1b1 /src | |
| parent | 953f53921505a884f3912f2d8db5217a71c0479a (diff) | |
| download | nginx-6dc0c880e5b94dc507795369196dec5c2f9d2cc2.tar.gz nginx-6dc0c880e5b94dc507795369196dec5c2f9d2cc2.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/modules/ngx_http_dav_module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c index 95c7b3299..105a607ae 100644 --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -513,7 +513,6 @@ ngx_http_dav_mkcol_handler(ngx_http_request_t *r, ngx_http_dav_loc_conf_t *dlcf) } *(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 @@ ngx_http_dav_mkcol_handler(ngx_http_request_t *r, ngx_http_dav_loc_conf_t *dlcf) 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; } |
