Mercurial > hg > nginx-vendor-1-0
comparison src/os/unix/ngx_freebsd_sendfile_chain.c @ 524:80f7156c2965 NGINX_0_8_14
nginx 0.8.14
*) Bugfix: an expired cached response might stick in the "UPDATING"
state.
*) Bugfix: a segmentation fault might occur in worker process, if
error_log was set to info or debug level.
Thanks to Sergey Bochenkov.
*) Bugfix: in embedded perl module; the bug had appeared in 0.8.11.
*) Bugfix: an "error_page" directive did not redirect a 413 error; the
bug had appeared in 0.6.10.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 07 Sep 2009 00:00:00 +0400 |
parents | d41628eb4d0a |
children | 692f4d4d7f10 |
comparison
equal
deleted
inserted
replaced
523:441fbf722b8c | 524:80f7156c2965 |
---|---|
293 return NGX_CHAIN_ERROR; | 293 return NGX_CHAIN_ERROR; |
294 } | 294 } |
295 | 295 |
296 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, err, | 296 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, err, |
297 "sendfile() sent only %O bytes", sent); | 297 "sendfile() sent only %O bytes", sent); |
298 } | |
299 | 298 |
300 /* | 299 /* |
301 * sendfile() in FreeBSD 3.x-4.x may return value >= 0 | 300 * sendfile() in FreeBSD 3.x-4.x may return value >= 0 |
302 * on success, although only 0 is documented | 301 * on success, although only 0 is documented |
303 */ | 302 */ |
304 | 303 |
305 if (rc >= 0 && sent == 0) { | 304 } else if (rc >= 0 && sent == 0) { |
306 | 305 |
307 /* | 306 /* |
308 * if rc is OK and sent equal to zero, then someone | 307 * if rc is OK and sent equal to zero, then someone |
309 * has truncated the file, so the offset became beyond | 308 * has truncated the file, so the offset became beyond |
310 * the end of the file | 309 * the end of the file |
311 */ | 310 */ |
312 | 311 |
313 ngx_log_error(NGX_LOG_ALERT, c->log, 0, | 312 ngx_log_error(NGX_LOG_ALERT, c->log, 0, |
314 "sendfile() reported that \"%s\" was truncated", | 313 "sendfile() reported that \"%s\" was truncated at %O", |
315 file->file->name.data); | 314 file->file->name.data, file->file_pos); |
316 | 315 |
317 return NGX_CHAIN_ERROR; | 316 return NGX_CHAIN_ERROR; |
318 } | 317 } |
319 | 318 |
320 ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0, | 319 ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0, |