comparison src/http/modules/ngx_http_dav_module.c @ 7330:8e7a5de61664

Dav: changed COPY of a file to preserve access mask. The behaviour is now in line with COPY of a directory with contents, which preserves access masks on individual files, as well as the "cp" command. Requested by Roman Arutyunyan.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 01 Aug 2018 02:12:21 +0300
parents 573f20116163
children bb40db0e380d
comparison
equal deleted inserted replaced
7329:63a76a594dd8 7330:8e7a5de61664
843 843
844 dlcf = ngx_http_get_module_loc_conf(r, ngx_http_dav_module); 844 dlcf = ngx_http_get_module_loc_conf(r, ngx_http_dav_module);
845 845
846 cf.size = ngx_file_size(&fi); 846 cf.size = ngx_file_size(&fi);
847 cf.buf_size = 0; 847 cf.buf_size = 0;
848 cf.access = dlcf->access; 848 cf.access = ngx_file_access(&fi);
849 cf.time = ngx_file_mtime(&fi); 849 cf.time = ngx_file_mtime(&fi);
850 cf.log = r->connection->log; 850 cf.log = r->connection->log;
851 851
852 if (ngx_copy_file(path.data, copy.path.data, &cf) == NGX_OK) { 852 if (ngx_copy_file(path.data, copy.path.data, &cf) == NGX_OK) {
853 return NGX_HTTP_NO_CONTENT; 853 return NGX_HTTP_NO_CONTENT;