Mercurial > hg > nginx
comparison src/http/ngx_http_log_handler.c @ 415:3c56e834be46
nginx-0.0.10-2004-09-05-23:54:02 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 05 Sep 2004 19:54:02 +0000 |
parents | 8ac40cae79f0 |
children | 0d08eabe5c7b |
comparison
equal
deleted
inserted
replaced
414:388a842cbbe1 | 415:3c56e834be46 |
---|---|
92 NULL, /* init module */ | 92 NULL, /* init module */ |
93 NULL /* init child */ | 93 NULL /* init child */ |
94 }; | 94 }; |
95 | 95 |
96 | 96 |
97 static ngx_str_t http_access_log = ngx_string("access.log"); | 97 static ngx_str_t http_access_log = ngx_string(NGX_HTTP_LOG_PATH); |
98 | 98 |
99 | 99 |
100 static ngx_str_t ngx_http_combined_fmt = | 100 static ngx_str_t ngx_http_combined_fmt = |
101 ngx_string("%addr - - [%time] \"%request\" %status %apache_length " | 101 ngx_string("%addr - - [%time] \"%request\" %status %apache_length " |
102 "\"%{Referer}i\" \"%{User-Agent}i\""); | 102 "\"%{Referer}i\" \"%{User-Agent}i\""); |
337 static u_char *ngx_http_log_unknown_header_in(ngx_http_request_t *r, | 337 static u_char *ngx_http_log_unknown_header_in(ngx_http_request_t *r, |
338 u_char *buf, uintptr_t data) | 338 u_char *buf, uintptr_t data) |
339 { | 339 { |
340 ngx_uint_t i; | 340 ngx_uint_t i; |
341 ngx_str_t *s; | 341 ngx_str_t *s; |
342 ngx_list_part_t *part; | |
342 ngx_table_elt_t *h; | 343 ngx_table_elt_t *h; |
343 | 344 |
344 s = (ngx_str_t *) data; | 345 s = (ngx_str_t *) data; |
345 | 346 |
346 h = r->headers_in.headers.elts; | 347 part = &r->headers_in.headers.part; |
347 for (i = 0; i < r->headers_in.headers.nelts; i++) { | 348 h = part->elts; |
349 | |
350 for (i = 0; /* void */; i++) { | |
351 | |
352 if (i >= part->nelts) { | |
353 if (part->next == NULL) { | |
354 break; | |
355 } | |
356 | |
357 part = part->next; | |
358 h = part->elts; | |
359 i = 0; | |
360 } | |
361 | |
348 if (h[i].key.len != s->len) { | 362 if (h[i].key.len != s->len) { |
349 continue; | 363 continue; |
350 } | 364 } |
351 | 365 |
352 if (ngx_strncasecmp(h[i].key.data, s->data, s->len) == 0) { | 366 if (ngx_strncasecmp(h[i].key.data, s->data, s->len) == 0) { |
545 u_char *buf, | 559 u_char *buf, |
546 uintptr_t data) | 560 uintptr_t data) |
547 { | 561 { |
548 ngx_uint_t i; | 562 ngx_uint_t i; |
549 ngx_str_t *s; | 563 ngx_str_t *s; |
564 ngx_list_part_t *part; | |
550 ngx_table_elt_t *h; | 565 ngx_table_elt_t *h; |
551 | 566 |
552 s = (ngx_str_t *) data; | 567 s = (ngx_str_t *) data; |
553 | 568 |
554 h = r->headers_out.headers.elts; | 569 part = &r->headers_out.headers.part; |
555 for (i = 0; i < r->headers_out.headers.nelts; i++) { | 570 h = part->elts; |
571 | |
572 for (i = 0; /* void */; i++) { | |
573 | |
574 if (i >= part->nelts) { | |
575 if (part->next == NULL) { | |
576 break; | |
577 } | |
578 | |
579 part = part->next; | |
580 h = part->elts; | |
581 i = 0; | |
582 } | |
583 | |
556 if (h[i].key.len != s->len) { | 584 if (h[i].key.len != s->len) { |
557 continue; | 585 continue; |
558 } | 586 } |
559 | 587 |
560 if (ngx_strncasecmp(h[i].key.data, s->data, s->len) == 0) { | 588 if (ngx_strncasecmp(h[i].key.data, s->data, s->len) == 0) { |