Mercurial > hg > nginx
diff src/http/modules/ngx_http_log_module.c @ 4710:5a4666d4b6cb stable-1.2
Merge of r4636, r4637, r4638: config sanity checks.
*) Added syntax checking of the second parameter of the "split_clients"
directive.
*) Capped the status code that may be returned with "return" and
"try_files".
*) Zero padded the returned and logged HTTP status code, and fixed possible
buffer overrun in $status handling.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 29 Jun 2012 17:28:41 +0000 |
parents | 674227175c4c |
children | 956edecaedeb |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c Tue Jun 26 14:40:23 2012 +0000 +++ b/src/http/modules/ngx_http_log_module.c Fri Jun 29 17:28:41 2012 +0000 @@ -205,7 +205,7 @@ { ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec }, { ngx_string("request_time"), NGX_TIME_T_LEN + 4, ngx_http_log_request_time }, - { ngx_string("status"), 3, ngx_http_log_status }, + { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status }, { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent }, { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_body_bytes_sent }, @@ -593,7 +593,7 @@ status = 0; } - return ngx_sprintf(buf, "%ui", status); + return ngx_sprintf(buf, "%03ui", status); }