comparison src/http/modules/ngx_http_dav_module.c @ 484:ed5e10fb40fc NGINX_0_7_54

nginx 0.7.54 *) Feature: the ngx_http_image_filter_module. *) Feature: the "proxy_ignore_headers" and "fastcgi_ignore_headers" directives. *) Bugfix: a segmentation fault might occur in worker process, if an "open_file_cache_errors off" directive was used; the bug had appeared in 0.7.53. *) Bugfix: the "port_in_redirect off" directive did not work; the bug had appeared in 0.7.39. *) Bugfix: improve handling of "select" method errors. *) Bugfix: of "select() failed (10022: ...)" error in nginx/Windows. *) Bugfix: in error text descriptions in nginx/Windows; the bug had appeared in 0.7.53.
author Igor Sysoev <http://sysoev.ru>
date Fri, 01 May 2009 00:00:00 +0400
parents 549994537f15
children f39b9e29530d
comparison
equal deleted inserted replaced
483:0a2f4b42ddad 484:ed5e10fb40fc
219 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 219 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
220 "http put filename: \"%s\"", path.data); 220 "http put filename: \"%s\"", path.data);
221 221
222 temp = &r->request_body->temp_file->file.name; 222 temp = &r->request_body->temp_file->file.name;
223 223
224 if (ngx_file_info(path.data, &fi) == -1) { 224 if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
225 status = NGX_HTTP_CREATED; 225 status = NGX_HTTP_CREATED;
226 226
227 } else { 227 } else {
228 status = NGX_HTTP_NO_CONTENT; 228 status = NGX_HTTP_NO_CONTENT;
229 229
324 ngx_http_map_uri_to_path(r, &path, &root, 0); 324 ngx_http_map_uri_to_path(r, &path, &root, 0);
325 325
326 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 326 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
327 "http delete filename: \"%s\"", path.data); 327 "http delete filename: \"%s\"", path.data);
328 328
329 if (ngx_file_info(path.data, &fi) == -1) { 329 if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
330 err = ngx_errno; 330 err = ngx_errno;
331 331
332 rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND; 332 rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND;
333 333
334 return ngx_http_dav_error(r->connection->log, err, 334 return ngx_http_dav_error(r->connection->log, err,
676 } 676 }
677 677
678 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 678 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
679 "http copy to: \"%s\"", copy.path.data); 679 "http copy to: \"%s\"", copy.path.data);
680 680
681 if (ngx_file_info(copy.path.data, &fi) == -1) { 681 if (ngx_file_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
682 err = ngx_errno; 682 err = ngx_errno;
683 683
684 if (err != NGX_ENOENT) { 684 if (err != NGX_ENOENT) {
685 return ngx_http_dav_error(r->connection->log, err, 685 return ngx_http_dav_error(r->connection->log, err,
686 NGX_HTTP_NOT_FOUND, ngx_file_info_n, 686 NGX_HTTP_NOT_FOUND, ngx_file_info_n,
710 } 710 }
711 711
712 dir = ngx_is_dir(&fi); 712 dir = ngx_is_dir(&fi);
713 } 713 }
714 714
715 if (ngx_file_info(path.data, &fi) == -1) { 715 if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
716 return ngx_http_dav_error(r->connection->log, ngx_errno, 716 return ngx_http_dav_error(r->connection->log, ngx_errno,
717 NGX_HTTP_NOT_FOUND, ngx_file_info_n, 717 NGX_HTTP_NOT_FOUND, ngx_file_info_n,
718 path.data); 718 path.data);
719 } 719 }
720 720