mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
clients
demo
misc
patches
lua-5.1.4-makefile_install_fix.patch
lua_cjson-1.0.2-array_detection_fix.patch
nginx-0.8.54-allow_request_body_updating.patch
nginx-0.8.54-named_location_clear_mods_ctx.patch
nginx-0.8.54-no_Werror.patch
nginx-0.8.54-no_error_pages.patch
nginx-0.8.54-redirect_memcpy_overlap.patch
nginx-0.8.54-request_body_in_single_buf.patch
nginx-0.8.54-request_body_preread_fix.patch
nginx-0.8.54-server_header.patch
nginx-0.8.54-subrequest_loop.patch
nginx-0.8.54-variable_header_ignore_no_hash.patch
nginx-1.0.10-allow_request_body_updating.patch
nginx-1.0.10-epoll_check_stale_wev.patch
nginx-1.0.10-gzip_empty_flush_buf.patch
nginx-1.0.10-log_escape_non_ascii.patch
nginx-1.0.10-named_location_clear_mods_ctx.patch
nginx-1.0.10-no_Werror.patch
nginx-1.0.10-no_error_pages.patch
nginx-1.0.10-no_pool.patch
nginx-1.0.10-request_body_in_single_buf.patch
nginx-1.0.10-request_body_preread_fix.patch
nginx-1.0.10-server_header.patch
nginx-1.0.10-subrequest_loop.patch
nginx-1.0.10-variable_header_ignore_no_hash.patch
nginx-1.0.4-gcc46_fixes.patch
nginx-1.0.4-no_Werror.patch
nginx-1.0.4-no_error_pages.patch
nginx-1.0.4-no_pool.patch
nginx-1.0.4-request_body_in_single_buf.patch
nginx-1.0.4-request_body_preread_fix.patch
nginx-1.0.4-server_header.patch
nginx-1.0.4-subrequest_loop.patch
nginx-1.0.5-no_Werror.patch
nginx-1.0.5-no_error_pages.patch
nginx-1.0.5-no_pool.patch
nginx-1.0.5-request_body_in_single_buf.patch
nginx-1.0.5-request_body_preread_fix.patch
nginx-1.0.5-server_header.patch
nginx-1.0.5-subrequest_loop.patch
nginx-1.0.6-gzip_empty_flush_buf.patch
nginx-1.0.6-no_Werror.patch
nginx-1.0.6-no_error_pages.patch
nginx-1.0.6-no_pool.patch
nginx-1.0.6-request_body_in_single_buf.patch
nginx-1.0.6-request_body_preread_fix.patch
nginx-1.0.6-server_header.patch
nginx-1.0.6-subrequest_loop.patch
nginx-1.0.6-variable_header_ignore_no_hash.patch
nginx-1.0.8-allow_request_body_updating.patch
nginx-1.0.8-gzip_empty_flush_buf.patch
nginx-1.0.8-named_location_clear_mods_ctx.patch
nginx-1.0.8-no_Werror.patch
nginx-1.0.8-no_error_pages.patch
nginx-1.0.8-no_pool.patch
nginx-1.0.8-request_body_in_single_buf.patch
nginx-1.0.8-request_body_preread_fix.patch
nginx-1.0.8-server_header.patch
nginx-1.0.8-subrequest_loop.patch
nginx-1.0.8-variable_header_ignore_no_hash.patch
nginx-1.0.9-allow_request_body_updating.patch
nginx-1.0.9-epoll_check_stale_wev.patch
nginx-1.0.9-gzip_empty_flush_buf.patch
nginx-1.0.9-log_escape_non_ascii.patch
nginx-1.0.9-named_location_clear_mods_ctx.patch
nginx-1.0.9-no_Werror.patch
nginx-1.0.9-no_error_pages.patch
nginx-1.0.9-no_pool.patch
nginx-1.0.9-request_body_in_single_buf.patch
nginx-1.0.9-request_body_preread_fix.patch
nginx-1.0.9-server_header.patch
nginx-1.0.9-subrequest_loop.patch
nginx-1.0.9-variable_header_ignore_no_hash.patch
nginx-1.1.2-no_error_pages.patch
nginx-1.1.4-variable_header_ignore_no_hash.patch
nginx-1.1.5-named_location_clear_mods_ctx.patch
specs
t
util
.gitignore
Makefile
README
72 lines
1.5 KiB
Diff
72 lines
1.5 KiB
Diff
--- nginx-1.1.4/src/http/ngx_http_variables.c 2011-05-30 20:36:17.000000000 +0800
|
|
+++ nginx-1.1.4-patched/src/http/ngx_http_variables.c 2011-11-08 21:39:28.509366052 +0800
|
|
@@ -648,7 +648,17 @@
|
|
|
|
a = (ngx_array_t *) ((char *) r + data);
|
|
|
|
- n = a->nelts;
|
|
+ h = a->elts;
|
|
+ n = 0;
|
|
+
|
|
+ for (i = 0; i < a->nelts; i++) {
|
|
+
|
|
+ if (h[i]->hash == 0) {
|
|
+ continue;
|
|
+ }
|
|
+
|
|
+ n++;
|
|
+ }
|
|
|
|
if (n == 0) {
|
|
v->not_found = 1;
|
|
@@ -659,9 +669,7 @@
|
|
v->no_cacheable = 0;
|
|
v->not_found = 0;
|
|
|
|
- h = a->elts;
|
|
-
|
|
- if (n == 1) {
|
|
+ if (n == 1 && a->nelts == 1) {
|
|
v->len = (*h)->value.len;
|
|
v->data = (*h)->value.data;
|
|
|
|
@@ -670,7 +678,12 @@
|
|
|
|
len = - (ssize_t) (sizeof("; ") - 1);
|
|
|
|
- for (i = 0; i < n; i++) {
|
|
+ for (i = 0; i < a->nelts; i++) {
|
|
+
|
|
+ if (h[i]->hash == 0) {
|
|
+ continue;
|
|
+ }
|
|
+
|
|
len += h[i]->value.len + sizeof("; ") - 1;
|
|
}
|
|
|
|
@@ -682,7 +695,12 @@
|
|
v->len = len;
|
|
v->data = p;
|
|
|
|
- for (i = 0; /* void */ ; i++) {
|
|
+ for (i = 0; i < n; i++) {
|
|
+
|
|
+ if (h[i]->hash == 0) {
|
|
+ continue;
|
|
+ }
|
|
+
|
|
p = ngx_copy(p, h[i]->value.data, h[i]->value.len);
|
|
|
|
if (i == n - 1) {
|
|
@@ -738,6 +756,10 @@
|
|
i = 0;
|
|
}
|
|
|
|
+ if (header[i].hash == 0) {
|
|
+ continue;
|
|
+ }
|
|
+
|
|
for (n = 0; n + prefix < var->len && n < header[i].key.len; n++) {
|
|
ch = header[i].key.data[n];
|
|
|