[patch] fix a http dav module mkcol response problem
xiezhenye
nginx-forum at nginx.us
Mon Sep 28 12:23:31 MSD 2009
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:
*** 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);
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,9639,9639#msg-9639
More information about the nginx
mailing list