comparison src/http/modules/ngx_http_dav_module.c @ 276:c5c2b2883984 NGINX_0_5_8

nginx 0.5.8 *) Bugfix: a segmentation fault might occur if "client_body_in_file_only on" was used and a request body was small. *) Bugfix: a segmentation fault occurred if "client_body_in_file_only on" and "proxy_pass_request_body off" or "fastcgi_pass_request_body off" directives were used, and nginx switched to a next upstream. *) Bugfix: if the "proxy_buffering off" directive was used and a client connection was non-active, then the connection was closed after send timeout; bug appeared in 0.4.7. *) Bugfix: if the "epoll" method was used and a client closed a connection prematurely, then nginx closed the connection after a send timeout only. *) Bugfix: the "[alert] zero size buf" error when FastCGI server was used. *) Bugfixes in the "limit_zone" directive.
author Igor Sysoev <http://sysoev.ru>
date Fri, 19 Jan 2007 00:00:00 +0300
parents 29a6403156b0
children 704622b2528a
comparison
equal deleted inserted replaced
275:1779577cb845 276:c5c2b2883984
17 ngx_uint_t access; 17 ngx_uint_t access;
18 } ngx_http_dav_loc_conf_t; 18 } ngx_http_dav_loc_conf_t;
19 19
20 20
21 static ngx_int_t ngx_http_dav_handler(ngx_http_request_t *r); 21 static ngx_int_t ngx_http_dav_handler(ngx_http_request_t *r);
22 static ngx_int_t ngx_http_dav_no_init(ngx_tree_ctx_t *ctx, 22 static ngx_int_t ngx_http_dav_no_init(void *ctx, void *prev);
23 ngx_tree_ctx_t *prev);
24 static ngx_int_t ngx_http_dav_noop(ngx_tree_ctx_t *ctx, ngx_str_t *path); 23 static ngx_int_t ngx_http_dav_noop(ngx_tree_ctx_t *ctx, ngx_str_t *path);
25 static ngx_int_t ngx_http_dav_delete_dir(ngx_tree_ctx_t *ctx, ngx_str_t *path); 24 static ngx_int_t ngx_http_dav_delete_dir(ngx_tree_ctx_t *ctx, ngx_str_t *path);
26 static ngx_int_t ngx_http_dav_delete_file(ngx_tree_ctx_t *ctx, ngx_str_t *path); 25 static ngx_int_t ngx_http_dav_delete_file(ngx_tree_ctx_t *ctx, ngx_str_t *path);
27 static void ngx_http_dav_put_handler(ngx_http_request_t *r); 26 static void ngx_http_dav_put_handler(ngx_http_request_t *r);
28 static ngx_int_t ngx_http_dav_error(ngx_http_request_t *, ngx_err_t err, 27 static ngx_int_t ngx_http_dav_error(ngx_http_request_t *, ngx_err_t err,
129 switch (r->method) { 128 switch (r->method) {
130 129
131 case NGX_HTTP_PUT: 130 case NGX_HTTP_PUT:
132 131
133 if (r->uri.data[r->uri.len - 1] == '/') { 132 if (r->uri.data[r->uri.len - 1] == '/') {
134 return NGX_DECLINED; 133 return NGX_HTTP_BAD_REQUEST;
135 } 134 }
136 135
137 r->request_body_in_file_only = 1; 136 r->request_body_in_file_only = 1;
138 r->request_body_in_persistent_file = 1; 137 r->request_body_in_persistent_file = 1;
139 r->request_body_delete_incomplete_file = 1; 138 r->request_body_delete_incomplete_file = 1;
188 tree.file_handler = ngx_http_dav_delete_file; 187 tree.file_handler = ngx_http_dav_delete_file;
189 tree.pre_tree_handler = ngx_http_dav_noop; 188 tree.pre_tree_handler = ngx_http_dav_noop;
190 tree.post_tree_handler = ngx_http_dav_delete_dir; 189 tree.post_tree_handler = ngx_http_dav_delete_dir;
191 tree.spec_handler = ngx_http_dav_delete_file; 190 tree.spec_handler = ngx_http_dav_delete_file;
192 tree.data = NULL; 191 tree.data = NULL;
193 tree.size = 0; 192 tree.alloc = 0;
194 tree.log = r->connection->log; 193 tree.log = r->connection->log;
195 194
196 if (ngx_walk_tree(&tree, &path) == NGX_OK) { 195 if (ngx_walk_tree(&tree, &path) == NGX_OK) {
197 196
198 if (ngx_delete_dir(path.data) != NGX_FILE_ERROR) { 197 if (ngx_delete_dir(path.data) != NGX_FILE_ERROR) {
268 return NGX_DECLINED; 267 return NGX_DECLINED;
269 } 268 }
270 269
271 270
272 static ngx_int_t 271 static ngx_int_t
273 ngx_http_dav_no_init(ngx_tree_ctx_t *ctx, ngx_tree_ctx_t *prev) 272 ngx_http_dav_no_init(void *ctx, void *prev)
274 { 273 {
275 return NGX_OK; 274 return NGX_OK;
276 } 275 }
277 276
278 277