Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
4708:668de9844a02 | 4710:5a4666d4b6cb |
---|---|
203 { ngx_string("time_iso8601"), sizeof("1970-09-28T12:00:00+06:00") - 1, | 203 { ngx_string("time_iso8601"), sizeof("1970-09-28T12:00:00+06:00") - 1, |
204 ngx_http_log_iso8601 }, | 204 ngx_http_log_iso8601 }, |
205 { ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec }, | 205 { ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec }, |
206 { ngx_string("request_time"), NGX_TIME_T_LEN + 4, | 206 { ngx_string("request_time"), NGX_TIME_T_LEN + 4, |
207 ngx_http_log_request_time }, | 207 ngx_http_log_request_time }, |
208 { ngx_string("status"), 3, ngx_http_log_status }, | 208 { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status }, |
209 { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent }, | 209 { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent }, |
210 { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN, | 210 { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN, |
211 ngx_http_log_body_bytes_sent }, | 211 ngx_http_log_body_bytes_sent }, |
212 { ngx_string("apache_bytes_sent"), NGX_OFF_T_LEN, | 212 { ngx_string("apache_bytes_sent"), NGX_OFF_T_LEN, |
213 ngx_http_log_body_bytes_sent }, | 213 ngx_http_log_body_bytes_sent }, |
591 | 591 |
592 } else { | 592 } else { |
593 status = 0; | 593 status = 0; |
594 } | 594 } |
595 | 595 |
596 return ngx_sprintf(buf, "%ui", status); | 596 return ngx_sprintf(buf, "%03ui", status); |
597 } | 597 } |
598 | 598 |
599 | 599 |
600 static u_char * | 600 static u_char * |
601 ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf, | 601 ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf, |