From 86307612540b487907ee32b435bd8a57123711ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Tue, 8 Nov 2011 22:26:39 +0800 Subject: [PATCH] fixed the variable_header_ignore_no_hash patch again. thanks Markus Linnala. --- ...ginx-1.0.9-variable_header_ignore_no_hash.patch | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/patches/nginx-1.0.9-variable_header_ignore_no_hash.patch b/patches/nginx-1.0.9-variable_header_ignore_no_hash.patch index 554078f..aaaeb00 100644 --- a/patches/nginx-1.0.9-variable_header_ignore_no_hash.patch +++ b/patches/nginx-1.0.9-variable_header_ignore_no_hash.patch @@ -1,5 +1,5 @@ --- nginx-1.0.9/src/http/ngx_http_variables.c 2011-05-30 20:36:17.000000000 +0800 -+++ nginx-1.0.9-patched/src/http/ngx_http_variables.c 2011-11-08 21:39:28.509366052 +0800 ++++ nginx-1.0.9-patched/src/http/ngx_http_variables.c 2011-11-08 22:21:55.229247198 +0800 @@ -648,7 +648,17 @@ a = (ngx_array_t *) ((char *) r + data); @@ -44,12 +44,10 @@ len += h[i]->value.len + sizeof("; ") - 1; } -@@ -682,7 +695,12 @@ - v->len = len; +@@ -683,9 +696,14 @@ v->data = p; -- for (i = 0; /* void */ ; i++) { -+ for (i = 0; i < n; i++) { + for (i = 0; /* void */ ; i++) { + + if (h[i]->hash == 0) { + continue; @@ -57,7 +55,11 @@ + p = ngx_copy(p, h[i]->value.data, h[i]->value.len); - if (i == n - 1) { +- if (i == n - 1) { ++ if (--n == 0) { + break; + } + @@ -738,6 +756,10 @@ i = 0; }