comparison src/http/modules/ngx_http_dav_module.c @ 568:566e105a89f1 NGINX_0_8_36

nginx 0.8.36 *) Bugfix: the ngx_http_dav_module handled incorrectly the DELETE, COPY, and MOVE methods for symlinks. *) Bugfix: values of the $query_string, $arg_..., etc. variables cached in main request were used by the SSI module in subrequests. *) Bugfix: a variable value was repeatedly encoded after each an "echo" SSI-command output; the bug had appeared in 0.6.14. *) Bugfix: a worker process hung if a FIFO file was requested. Thanks to Vicente Aguilar and Maxim Dounin. *) Bugfix: OpenSSL-1.0.0 compatibility on 64-bit Linux. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built --without-http-cache; the bug had appeared in 0.8.35.
author Igor Sysoev <http://sysoev.ru>
date Thu, 22 Apr 2010 00:00:00 +0400
parents f7ec98e3caeb
children ff463db0be31
comparison
equal deleted inserted replaced
567:a49f5d0aff01 568:566e105a89f1
323 ngx_http_map_uri_to_path(r, &path, &root, 0); 323 ngx_http_map_uri_to_path(r, &path, &root, 0);
324 324
325 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 325 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
326 "http delete filename: \"%s\"", path.data); 326 "http delete filename: \"%s\"", path.data);
327 327
328 if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) { 328 if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
329 err = ngx_errno; 329 err = ngx_errno;
330 330
331 rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND; 331 rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND;
332 332
333 return ngx_http_dav_error(r->connection->log, err, 333 return ngx_http_dav_error(r->connection->log, err,
334 rc, ngx_file_info_n, path.data); 334 rc, ngx_link_info_n, path.data);
335 } 335 }
336 336
337 if (ngx_is_dir(&fi)) { 337 if (ngx_is_dir(&fi)) {
338 338
339 if (r->uri.data[r->uri.len - 1] != '/') { 339 if (r->uri.data[r->uri.len - 1] != '/') {
356 356
357 } else { 357 } else {
358 358
359 /* 359 /*
360 * we do not need to test (r->uri.data[r->uri.len - 1] == '/') 360 * we do not need to test (r->uri.data[r->uri.len - 1] == '/')
361 * because ngx_file_info("/file/") returned NGX_ENOTDIR above 361 * because ngx_link_info("/file/") returned NGX_ENOTDIR above
362 */ 362 */
363 363
364 depth = ngx_http_dav_depth(r, 0); 364 depth = ngx_http_dav_depth(r, 0);
365 365
366 if (depth != 0 && depth != NGX_HTTP_DAV_INFINITY_DEPTH) { 366 if (depth != 0 && depth != NGX_HTTP_DAV_INFINITY_DEPTH) {
683 } 683 }
684 684
685 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 685 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
686 "http copy to: \"%s\"", copy.path.data); 686 "http copy to: \"%s\"", copy.path.data);
687 687
688 if (ngx_file_info(copy.path.data, &fi) == NGX_FILE_ERROR) { 688 if (ngx_link_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
689 err = ngx_errno; 689 err = ngx_errno;
690 690
691 if (err != NGX_ENOENT) { 691 if (err != NGX_ENOENT) {
692 return ngx_http_dav_error(r->connection->log, err, 692 return ngx_http_dav_error(r->connection->log, err,
693 NGX_HTTP_NOT_FOUND, ngx_file_info_n, 693 NGX_HTTP_NOT_FOUND, ngx_link_info_n,
694 copy.path.data); 694 copy.path.data);
695 } 695 }
696 696
697 /* destination does not exist */ 697 /* destination does not exist */
698 698
717 } 717 }
718 718
719 dir = ngx_is_dir(&fi); 719 dir = ngx_is_dir(&fi);
720 } 720 }
721 721
722 if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) { 722 if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
723 return ngx_http_dav_error(r->connection->log, ngx_errno, 723 return ngx_http_dav_error(r->connection->log, ngx_errno,
724 NGX_HTTP_NOT_FOUND, ngx_file_info_n, 724 NGX_HTTP_NOT_FOUND, ngx_link_info_n,
725 path.data); 725 path.data);
726 } 726 }
727 727
728 if (ngx_is_dir(&fi)) { 728 if (ngx_is_dir(&fi)) {
729 729