Welcome! Log In Create A New Profile

Advanced

[nginx] Dav: fixed Location in successful MKCOL response.

December 23, 2019 10:46AM
details: https://hg.nginx.org/nginx/rev/c1a7d3672653
branches:
changeset: 7601:c1a7d3672653
user: Ruslan Ermilov <ru@nginx.com>
date: Mon Dec 16 15:19:01 2019 +0300
description:
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:

src/http/modules/ngx_http_dav_module.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 3939483cd1b5 -r c1a7d3672653 src/http/modules/ngx_http_dav_module.c
--- 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;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Dav: fixed Location in successful MKCOL response.

ru@nginx.com 495 December 23, 2019 10:46AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 224
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready