comparison 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
comparison
equal deleted inserted replaced
23:5d37652cf26b 24:420dd3f9e703
26 uintptr_t data); 26 uintptr_t data);
27 static u_char *ngx_http_log_length(ngx_http_request_t *r, u_char *buf, 27 static u_char *ngx_http_log_length(ngx_http_request_t *r, u_char *buf,
28 uintptr_t data); 28 uintptr_t data);
29 static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf, 29 static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf,
30 uintptr_t data); 30 uintptr_t data);
31 static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf,
32 uintptr_t data);
31 static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf, 33 static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf,
32 uintptr_t data); 34 uintptr_t data);
33 static u_char *ngx_http_log_connection_header_out(ngx_http_request_t *r, 35 static u_char *ngx_http_log_connection_header_out(ngx_http_request_t *r,
34 u_char *buf, uintptr_t data); 36 u_char *buf, uintptr_t data);
35 static u_char *ngx_http_log_transfer_encoding_header_out(ngx_http_request_t *r, 37 static u_char *ngx_http_log_transfer_encoding_header_out(ngx_http_request_t *r,
116 { ngx_string("msec"), TIME_T_LEN + 4, ngx_http_log_msec }, 118 { ngx_string("msec"), TIME_T_LEN + 4, ngx_http_log_msec },
117 { ngx_string("request"), 0, ngx_http_log_request }, 119 { ngx_string("request"), 0, ngx_http_log_request },
118 { ngx_string("status"), 3, ngx_http_log_status }, 120 { ngx_string("status"), 3, ngx_http_log_status },
119 { ngx_string("length"), NGX_OFF_T_LEN, ngx_http_log_length }, 121 { ngx_string("length"), NGX_OFF_T_LEN, ngx_http_log_length },
120 { ngx_string("apache_length"), NGX_OFF_T_LEN, ngx_http_log_apache_length }, 122 { ngx_string("apache_length"), NGX_OFF_T_LEN, ngx_http_log_apache_length },
123 { ngx_string("request_length"), NGX_OFF_T_LEN,
124 ngx_http_log_request_length },
121 { ngx_string("i"), NGX_HTTP_LOG_ARG, ngx_http_log_header_in }, 125 { ngx_string("i"), NGX_HTTP_LOG_ARG, ngx_http_log_header_in },
122 { ngx_string("o"), NGX_HTTP_LOG_ARG, ngx_http_log_header_out }, 126 { ngx_string("o"), NGX_HTTP_LOG_ARG, ngx_http_log_header_out },
123 { ngx_null_string, 0, NULL } 127 { ngx_null_string, 0, NULL }
124 }; 128 };
125 129
278 282
279 static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf, 283 static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf,
280 uintptr_t data) 284 uintptr_t data)
281 { 285 {
282 return ngx_sprintf(buf, "%O", r->connection->sent - r->header_size); 286 return ngx_sprintf(buf, "%O", r->connection->sent - r->header_size);
287 }
288
289
290 static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf,
291 uintptr_t data)
292 {
293 return ngx_sprintf(buf, "%O", r->request_length);
283 } 294 }
284 295
285 296
286 static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf, 297 static u_char *ngx_http_log_header_in(ngx_http_request_t *r, u_char *buf,
287 uintptr_t data) 298 uintptr_t data)