aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_log_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-09-05 19:54:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-09-05 19:54:02 +0000
commit980a92472cc30271ad7e88eb2dcc43f00e984d4d (patch)
treeb8940cd9e6b8859c78e3c023c1373bae02371f2e /src/http/ngx_http_log_handler.c
parentb9e344175f4e971284aa14c8fe685936a4957d52 (diff)
downloadnginx-980a92472cc30271ad7e88eb2dcc43f00e984d4d.tar.gz
nginx-980a92472cc30271ad7e88eb2dcc43f00e984d4d.zip
nginx-0.0.10-2004-09-05-23:54:02 import
Diffstat (limited to 'src/http/ngx_http_log_handler.c')
-rw-r--r--src/http/ngx_http_log_handler.c38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c
index 057da7815..35014cf2a 100644
--- a/src/http/ngx_http_log_handler.c
+++ b/src/http/ngx_http_log_handler.c
@@ -94,7 +94,7 @@ ngx_module_t ngx_http_log_module = {
};
-static ngx_str_t http_access_log = ngx_string("access.log");
+static ngx_str_t http_access_log = ngx_string(NGX_HTTP_LOG_PATH);
static ngx_str_t ngx_http_combined_fmt =
@@ -339,12 +339,26 @@ static u_char *ngx_http_log_unknown_header_in(ngx_http_request_t *r,
{
ngx_uint_t i;
ngx_str_t *s;
+ ngx_list_part_t *part;
ngx_table_elt_t *h;
s = (ngx_str_t *) data;
- h = r->headers_in.headers.elts;
- for (i = 0; i < r->headers_in.headers.nelts; i++) {
+ part = &r->headers_in.headers.part;
+ h = part->elts;
+
+ for (i = 0; /* void */; i++) {
+
+ if (i >= part->nelts) {
+ if (part->next == NULL) {
+ break;
+ }
+
+ part = part->next;
+ h = part->elts;
+ i = 0;
+ }
+
if (h[i].key.len != s->len) {
continue;
}
@@ -547,12 +561,26 @@ static u_char *ngx_http_log_unknown_header_out(ngx_http_request_t *r,
{
ngx_uint_t i;
ngx_str_t *s;
+ ngx_list_part_t *part;
ngx_table_elt_t *h;
s = (ngx_str_t *) data;
- h = r->headers_out.headers.elts;
- for (i = 0; i < r->headers_out.headers.nelts; i++) {
+ part = &r->headers_out.headers.part;
+ h = part->elts;
+
+ for (i = 0; /* void */; i++) {
+
+ if (i >= part->nelts) {
+ if (part->next == NULL) {
+ break;
+ }
+
+ part = part->next;
+ h = part->elts;
+ i = 0;
+ }
+
if (h[i].key.len != s->len) {
continue;
}