comparison src/core/ngx_cycle.c @ 378:fc497c1dfb7c NGINX_0_6_33

nginx 0.6.33 *) Feature: now nginx returns the 405 status code for POST method requesting a static file only if the file exists. *) Workaround: compatibility with glibc 2.3. Thanks to Eric Benson and Maxim Dounin. *) Bugfix: the resolver did not understand big DNS responses. Thanks to Zyb. *) Bugfix: in HTTPS mode requests might fail with the "bad write retry" error. *) Bugfix: the ngx_http_charset_module did not understand quoted charset name received from backend. *) Bugfix: if the "max_fails=0" parameter was used in upstream with several servers, then a worker process exited on a SIGFPE signal. Thanks to Maxim Dounin. *) Bugfix: the $r->header_in() method did not return value of the "Host", "User-Agent", and "Connection" request header lines; the bug had appeared in 0.6.32. *) Bugfix: a full response was returned for request method HEAD while redirection via an "error_page" directive. *) Bugfix: if a directory has search only rights and the first index file was absent, then nginx returned the 500 status code. *) Bugfix: of recursive error_page for 500 status code.
author Igor Sysoev <http://sysoev.ru>
date Thu, 20 Nov 2008 00:00:00 +0300
parents d13234035cad
children
comparison
equal deleted inserted replaced
377:15c4ba3bc2fa 378:fc497c1dfb7c
968 968
969 969
970 void 970 void
971 ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user) 971 ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
972 { 972 {
973 ssize_t n, len;
973 ngx_fd_t fd; 974 ngx_fd_t fd;
974 ngx_uint_t i; 975 ngx_uint_t i;
975 ngx_list_part_t *part; 976 ngx_list_part_t *part;
976 ngx_open_file_t *file; 977 ngx_open_file_t *file;
977 978
991 992
992 if (file[i].name.data == NULL) { 993 if (file[i].name.data == NULL) {
993 continue; 994 continue;
994 } 995 }
995 996
996 if (file[i].buffer && file[i].pos - file[i].buffer != 0) { 997 len = file[i].pos - file[i].buffer;
997 ngx_write_fd(file[i].fd, file[i].buffer, 998
998 file[i].pos - file[i].buffer); 999 if (file[i].buffer && len != 0) {
1000
1001 n = ngx_write_fd(file[i].fd, file[i].buffer, len);
1002
1003 if (n == NGX_FILE_ERROR) {
1004 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
1005 ngx_write_fd_n " to \"%s\" failed",
1006 file[i].name.data);
1007
1008 } else if (n != len) {
1009 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
1010 ngx_write_fd_n " to \"%s\" was incomplete: %z of %uz",
1011 file[i].name.data, n, len);
1012 }
1013
999 file[i].pos = file[i].buffer; 1014 file[i].pos = file[i].buffer;
1000 } 1015 }
1001 1016
1002 fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR, 1017 fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR,
1003 NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND, 1018 NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND,