Mercurial > hg > nginx
comparison src/http/modules/ngx_http_log_module.c @ 3439:3354dfba9da4 stable-0.7
merge r3137, r3198, r3199, r3353, r3370, r3371, r3398, r3399:
cache related fixes:
*) do not pass buf with empty cached response,
this fixes "zero size buf in output" alert
*) hide cacheable Set-Cookie and P3P FastCGI response headers
*) test comma separator in "Cache-Control"
*) a cache manager thread handle was overwritten by a cache loader thread
handle, this caused an exit delay, the bug had been introduced in r3248
*) fix handling cached HTTP/0.9 response
*) log proxied HTTP/0.9 responses status as "009"
*) fix the "If-None-Match" header name
*) fix a cached zero-length body case
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 15:46:14 +0000 |
parents | eef19bd3c51e |
children |
comparison
equal
deleted
inserted
replaced
3438:a0a131127626 | 3439:3354dfba9da4 |
---|---|
540 | 540 |
541 | 541 |
542 static u_char * | 542 static u_char * |
543 ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) | 543 ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) |
544 { | 544 { |
545 return ngx_sprintf(buf, "%ui", | 545 ngx_uint_t status; |
546 r->err_status ? r->err_status : r->headers_out.status); | 546 |
547 if (r->err_status) { | |
548 status = r->err_status; | |
549 | |
550 } else if (r->headers_out.status) { | |
551 status = r->headers_out.status; | |
552 | |
553 } else if (r->http_version == NGX_HTTP_VERSION_9) { | |
554 *buf++ = '0'; | |
555 *buf++ = '0'; | |
556 *buf++ = '9'; | |
557 return buf; | |
558 | |
559 } else { | |
560 status = 0; | |
561 } | |
562 | |
563 return ngx_sprintf(buf, "%ui", status); | |
547 } | 564 } |
548 | 565 |
549 | 566 |
550 static u_char * | 567 static u_char * |
551 ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf, | 568 ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf, |