~ubuntu-branches/ubuntu/natty/nginx/natty

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_dav_module.c

  • Committer: Daniel Holbach
  • Date: 2010-07-22 07:45:20 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: daniel.holbach@canonical.com-20100722074520-lzfoz7cctw91gik7
Merging shared upstream rev into target branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
    ngx_int_t                 rc;
147
147
    ngx_http_dav_loc_conf_t  *dlcf;
148
148
 
149
 
    if (r->zero_in_uri) {
150
 
        return NGX_DECLINED;
151
 
    }
152
 
 
153
149
    dlcf = ngx_http_get_module_loc_conf(r, ngx_http_dav_module);
154
150
 
155
151
    if (!(r->method & dlcf->methods)) {
325
321
    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
326
322
                   "http delete filename: \"%s\"", path.data);
327
323
 
328
 
    if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
 
324
    if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
329
325
        err = ngx_errno;
330
326
 
331
327
        rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND;
332
328
 
333
329
        return ngx_http_dav_error(r->connection->log, err,
334
 
                                  rc, ngx_file_info_n, path.data);
 
330
                                  rc, ngx_link_info_n, path.data);
335
331
    }
336
332
 
337
333
    if (ngx_is_dir(&fi)) {
358
354
 
359
355
        /*
360
356
         * we do not need to test (r->uri.data[r->uri.len - 1] == '/')
361
 
         * because ngx_file_info("/file/") returned NGX_ENOTDIR above
 
357
         * because ngx_link_info("/file/") returned NGX_ENOTDIR above
362
358
         */
363
359
 
364
360
        depth = ngx_http_dav_depth(r, 0);
685
681
    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
686
682
                   "http copy to: \"%s\"", copy.path.data);
687
683
 
688
 
    if (ngx_file_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
 
684
    if (ngx_link_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
689
685
        err = ngx_errno;
690
686
 
691
687
        if (err != NGX_ENOENT) {
692
688
            return ngx_http_dav_error(r->connection->log, err,
693
 
                                      NGX_HTTP_NOT_FOUND, ngx_file_info_n,
 
689
                                      NGX_HTTP_NOT_FOUND, ngx_link_info_n,
694
690
                                      copy.path.data);
695
691
        }
696
692
 
719
715
        dir = ngx_is_dir(&fi);
720
716
    }
721
717
 
722
 
    if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
 
718
    if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
723
719
        return ngx_http_dav_error(r->connection->log, ngx_errno,
724
 
                                  NGX_HTTP_NOT_FOUND, ngx_file_info_n,
 
720
                                  NGX_HTTP_NOT_FOUND, ngx_link_info_n,
725
721
                                  path.data);
726
722
    }
727
723