Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_log_handler.c @ 24:420dd3f9e703 NGINX_0_1_12
nginx 0.1.12
*) Feature: the %request_length log parameter.
*) Bugfix: when using the /dev/poll, select and poll on the platforms,
where these methods may do the false reports, there may be the long
delay when the request was passed via the keep-alive connection. It
may be at least on Solaris when using the /dev/poll.
*) Bugfix: the send_lowat directive is ignored on Linux because Linux
does not support the SO_SNDLOWAT option.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 06 Dec 2004 00:00:00 +0300 |
parents | 8b6db3bda591 |
children | 45fe5b98a9de |
line wrap: on
line diff
--- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c @@ -28,6 +28,8 @@ static u_char *ngx_http_log_length(ngx_h uintptr_t data); static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf, uintptr_t data); +static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf, + uintptr_t data); static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf, uintptr_t data); static u_char *ngx_http_log_connection_header_out(ngx_http_request_t *r, @@ -118,6 +120,8 @@ ngx_http_log_op_name_t ngx_http_log_fmt_ { ngx_string("status"), 3, ngx_http_log_status }, { ngx_string("length"), NGX_OFF_T_LEN, ngx_http_log_length }, { ngx_string("apache_length"), NGX_OFF_T_LEN, ngx_http_log_apache_length }, + { ngx_string("request_length"), NGX_OFF_T_LEN, + ngx_http_log_request_length }, { ngx_string("i"), NGX_HTTP_LOG_ARG, ngx_http_log_header_in }, { ngx_string("o"), NGX_HTTP_LOG_ARG, ngx_http_log_header_out }, { ngx_null_string, 0, NULL } @@ -283,6 +287,13 @@ static u_char *ngx_http_log_apache_lengt } +static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf, + uintptr_t data) +{ + return ngx_sprintf(buf, "%O", r->request_length); +} + + static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf, uintptr_t data) {