comparison src/http/modules/ngx_http_log_module.c @ 570:8246d8a2c2be NGINX_0_8_37

nginx 0.8.37 *) Feature: the ngx_http_split_clients_module. *) Feature: the "map" directive supports keys more than 255 characters. *) Bugfix: nginx ignored the "private" and "no-store" values in the "Cache-Control" backend response header line. *) Bugfix: a "stub" parameter of an "include" SSI directive was not used, if empty response has 200 status code. *) Bugfix: if a proxied or FastCGI request was internally redirected to another proxied or FastCGI location, then a segmentation fault might occur in a worker process; the bug had appeared in 0.8.33. Thanks to Yichun Zhang. *) Bugfix: IMAP connections may hang until they timed out while talking to Zimbra server. Thanks to Alan Batie.
author Igor Sysoev <http://sysoev.ru>
date Mon, 17 May 2010 00:00:00 +0400
parents 5c576ea5dbd9
children 8214eaef3530
comparison
equal deleted inserted replaced
569:19b134bf21c0 570:8246d8a2c2be
531 531
532 tp = ngx_timeofday(); 532 tp = ngx_timeofday();
533 533
534 ms = (ngx_msec_int_t) 534 ms = (ngx_msec_int_t)
535 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); 535 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
536 ms = (ms >= 0) ? ms : 0; 536 ms = ngx_max(ms, 0);
537 537
538 return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000); 538 return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000);
539 } 539 }
540 540
541 541
745 fmt = ngx_array_push(&conf->formats); 745 fmt = ngx_array_push(&conf->formats);
746 if (fmt == NULL) { 746 if (fmt == NULL) {
747 return NULL; 747 return NULL;
748 } 748 }
749 749
750 fmt->name.len = sizeof("combined") - 1; 750 ngx_str_set(&fmt->name, "combined");
751 fmt->name.data = (u_char *) "combined";
752 751
753 fmt->flushes = NULL; 752 fmt->flushes = NULL;
754 753
755 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t)); 754 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
756 if (fmt->ops == NULL) { 755 if (fmt->ops == NULL) {
920 if (ngx_strcmp(name.data, "combined") == 0) { 919 if (ngx_strcmp(name.data, "combined") == 0) {
921 lmcf->combined_used = 1; 920 lmcf->combined_used = 1;
922 } 921 }
923 922
924 } else { 923 } else {
925 name.len = sizeof("combined") - 1; 924 ngx_str_set(&name, "combined");
926 name.data = (u_char *) "combined";
927 lmcf->combined_used = 1; 925 lmcf->combined_used = 1;
928 } 926 }
929 927
930 fmt = lmcf->formats.elts; 928 fmt = lmcf->formats.elts;
931 for (i = 0; i < lmcf->formats.nelts; i++) { 929 for (i = 0; i < lmcf->formats.nelts; i++) {