comparison src/http/ngx_http_log_handler.c @ 477:ad1e9ebf93bb release-0.1.13

nginx-0.1.13-RELEASE import *) Feature: the server_names_hash and server_names_hash_threshold directives. *) Bugfix: the *.domain.tld names in the "server_name" directive did not work. *) Bugfix: the %request_length log parameter logged the incorrect length.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 21 Dec 2004 12:30:30 +0000
parents c3c2848fc081
children c52408583801
comparison
equal deleted inserted replaced
476:7e8b84ab09e9 477:ad1e9ebf93bb
113 { ngx_string("addr"), INET_ADDRSTRLEN - 1, ngx_http_log_addr }, 113 { ngx_string("addr"), INET_ADDRSTRLEN - 1, ngx_http_log_addr },
114 { ngx_string("conn"), NGX_INT32_LEN, ngx_http_log_connection }, 114 { ngx_string("conn"), NGX_INT32_LEN, ngx_http_log_connection },
115 { ngx_string("pipe"), 1, ngx_http_log_pipe }, 115 { ngx_string("pipe"), 1, ngx_http_log_pipe },
116 { ngx_string("time"), sizeof("28/Sep/1970:12:00:00") - 1, 116 { ngx_string("time"), sizeof("28/Sep/1970:12:00:00") - 1,
117 ngx_http_log_time }, 117 ngx_http_log_time },
118 { ngx_string("msec"), TIME_T_LEN + 4, ngx_http_log_msec }, 118 { ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec },
119 { ngx_string("request"), 0, ngx_http_log_request }, 119 { ngx_string("request"), 0, ngx_http_log_request },
120 { ngx_string("status"), 3, ngx_http_log_status }, 120 { ngx_string("status"), 3, ngx_http_log_status },
121 { ngx_string("length"), NGX_OFF_T_LEN, ngx_http_log_length }, 121 { ngx_string("length"), NGX_OFF_T_LEN, ngx_http_log_length },
122 { 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, 123 { ngx_string("request_length"), NGX_SIZE_T_LEN,
124 ngx_http_log_request_length }, 124 ngx_http_log_request_length },
125 { 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 },
126 { 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 },
127 { ngx_null_string, 0, NULL } 127 { ngx_null_string, 0, NULL }
128 }; 128 };
288 288
289 289
290 static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf, 290 static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf,
291 uintptr_t data) 291 uintptr_t data)
292 { 292 {
293 return ngx_sprintf(buf, "%O", r->request_length); 293 return ngx_sprintf(buf, "%z", r->request_length);
294 } 294 }
295 295
296 296
297 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,
298 uintptr_t data) 298 uintptr_t data)