comparison src/http/ngx_http_request_body.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 2e9c57a5e50a
children 704622b2528a
comparison
equal deleted inserted replaced
275:1779577cb845 276:c5c2b2883984
72 tf->warn = "a client request body is buffered to a temporary file"; 72 tf->warn = "a client request body is buffered to a temporary file";
73 tf->log_level = r->request_body_file_log_level; 73 tf->log_level = r->request_body_file_log_level;
74 tf->persistent = r->request_body_in_persistent_file; 74 tf->persistent = r->request_body_in_persistent_file;
75 75
76 if (r->request_body_file_group_access) { 76 if (r->request_body_file_group_access) {
77 tf->mode = 0660; 77 tf->access = 0660;
78 } 78 }
79 79
80 rb->temp_file = tf; 80 rb->temp_file = tf;
81 81
82 if (ngx_create_temp_file(&tf->file, tf->path, tf->pool, 82 if (ngx_create_temp_file(&tf->file, tf->path, tf->pool,
83 tf->persistent, tf->mode) 83 tf->persistent, tf->access)
84 != NGX_OK) 84 != NGX_OK)
85 { 85 {
86 return NGX_HTTP_INTERNAL_SERVER_ERROR; 86 return NGX_HTTP_INTERNAL_SERVER_ERROR;
87 } 87 }
88 } 88 }
161 161
162 if (rb->rest <= (off_t) (b->end - b->last)) { 162 if (rb->rest <= (off_t) (b->end - b->last)) {
163 163
164 /* the whole request body may be placed in r->header_in */ 164 /* the whole request body may be placed in r->header_in */
165 165
166 rb->to_write = rb->bufs;
167
166 r->read_event_handler = ngx_http_read_client_request_body_handler; 168 r->read_event_handler = ngx_http_read_client_request_body_handler;
167 169
168 return ngx_http_do_read_client_request_body(r); 170 return ngx_http_do_read_client_request_body(r);
169 } 171 }
170 172
398 tf->warn = "a client request body is buffered to a temporary file"; 400 tf->warn = "a client request body is buffered to a temporary file";
399 tf->log_level = r->request_body_file_log_level; 401 tf->log_level = r->request_body_file_log_level;
400 tf->persistent = r->request_body_in_persistent_file; 402 tf->persistent = r->request_body_in_persistent_file;
401 403
402 if (r->request_body_file_group_access) { 404 if (r->request_body_file_group_access) {
403 tf->mode = 0660; 405 tf->access = 0660;
404 } 406 }
405 407
406 rb->temp_file = tf; 408 rb->temp_file = tf;
407 } 409 }
408 410