Welcome! Log In Create A New Profile

Advanced

[patch] fix a http dav module mkcol response problem

September 28, 2009 04:23AM
The response of http dav module on mkcol request has a problem. The "Location" header has a '\0' . This will cause some client wait to timeout.

e.g.
Location: http://localhost/path/created\0\r\n

I found in "ngx_http_dav_mkcol_handler" , after remove the tail '/' , it does not reduse the length of the uri.

patch:

[code]
*** ngx_http_dav_module.c.bak 2009-09-28 15:00:59.000000000 +0800
--- ngx_http_dav_module.c 2009-09-28 16:06:12.000000000 +0800
*************** ngx_http_dav_mkcol_handler(ngx_http_requ
*** 490,496 ****
p = ngx_http_map_uri_to_path(r, &path, &root, 0);

*(p - 1) = '\0';
!
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http mkcol path: \"%s\"", path.data);

--- 490,496 ----
p = ngx_http_map_uri_to_path(r, &path, &root, 0);

*(p - 1) = '\0';
! r->uri.len-= 1; /* reduce uri length */
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http mkcol path: \"%s\"", path.data);
[/code]
Subject Author Posted

[patch] fix a http dav module mkcol response problem

xiezhenye September 28, 2009 04:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready