comparison src/http/modules/ngx_http_dav_module.c @ 248:acd2ec3541cb NGINX_0_4_9

nginx 0.4.9 *) Feature: the "set" parameter in the "include" SSI command. *) Feature: the ngx_http_perl_module now tests the nginx.pm module version.
author Igor Sysoev <http://sysoev.ru>
date Fri, 13 Oct 2006 00:00:00 +0400
parents 38e7b94d63ac
children a0c9f21ee120
comparison
equal deleted inserted replaced
247:fcca101509a4 248:acd2ec3541cb
100 100
101 static ngx_int_t 101 static ngx_int_t
102 ngx_http_dav_handler(ngx_http_request_t *r) 102 ngx_http_dav_handler(ngx_http_request_t *r)
103 { 103 {
104 char *failed; 104 char *failed;
105 size_t root;
105 ngx_int_t rc; 106 ngx_int_t rc;
106 ngx_str_t path; 107 ngx_str_t path;
107 ngx_file_info_t fi; 108 ngx_file_info_t fi;
108 ngx_http_dav_loc_conf_t *dlcf; 109 ngx_http_dav_loc_conf_t *dlcf;
109 110
150 151
151 if (rc != NGX_OK && rc != NGX_AGAIN) { 152 if (rc != NGX_OK && rc != NGX_AGAIN) {
152 return rc; 153 return rc;
153 } 154 }
154 155
155 ngx_http_map_uri_to_path(r, &path, 0); 156 ngx_http_map_uri_to_path(r, &path, &root, 0);
156 157
157 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 158 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
158 "http delete filename: \"%s\"", path.data); 159 "http delete filename: \"%s\"", path.data);
159 160
160 if (ngx_file_info(path.data, &fi) != -1) { 161 if (ngx_file_info(path.data, &fi) != -1) {
217 218
218 if (rc != NGX_OK && rc != NGX_AGAIN) { 219 if (rc != NGX_OK && rc != NGX_AGAIN) {
219 return rc; 220 return rc;
220 } 221 }
221 222
222 ngx_http_map_uri_to_path(r, &path, 0); 223 ngx_http_map_uri_to_path(r, &path, &root, 0);
223 224
224 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 225 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
225 "http mkcol path: \"%s\"", path.data); 226 "http mkcol path: \"%s\"", path.data);
226 227
227 if (ngx_create_dir(path.data, dlcf->access) != NGX_FILE_ERROR) { 228 if (ngx_create_dir(path.data, dlcf->access) != NGX_FILE_ERROR) {
243 static void 244 static void
244 ngx_http_dav_put_handler(ngx_http_request_t *r) 245 ngx_http_dav_put_handler(ngx_http_request_t *r)
245 { 246 {
246 char *failed; 247 char *failed;
247 u_char *name; 248 u_char *name;
249 size_t root;
248 time_t date; 250 time_t date;
249 ngx_err_t err; 251 ngx_err_t err;
250 ngx_str_t *temp, path; 252 ngx_str_t *temp, path;
251 ngx_uint_t status; 253 ngx_uint_t status;
252 ngx_file_info_t fi; 254 ngx_file_info_t fi;
253 ngx_http_dav_loc_conf_t *dlcf; 255 ngx_http_dav_loc_conf_t *dlcf;
254 256
255 ngx_http_map_uri_to_path(r, &path, 0); 257 ngx_http_map_uri_to_path(r, &path, &root, 0);
256 258
257 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 259 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
258 "http put filename: \"%s\"", path.data); 260 "http put filename: \"%s\"", path.data);
259 261
260 temp = &r->request_body->temp_file->file.name; 262 temp = &r->request_body->temp_file->file.name;