diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-servers/nginx/files/AJP-nginx-1.7.9+.patch | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-servers/nginx/files/AJP-nginx-1.7.9+.patch')
-rw-r--r-- | www-servers/nginx/files/AJP-nginx-1.7.9+.patch | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/www-servers/nginx/files/AJP-nginx-1.7.9+.patch b/www-servers/nginx/files/AJP-nginx-1.7.9+.patch new file mode 100644 index 00000000000..35460fc5ad8 --- /dev/null +++ b/www-servers/nginx/files/AJP-nginx-1.7.9+.patch @@ -0,0 +1,184 @@ +From bf6cd93f2098b59260de8d494f0f4b1f11a84627 Mon Sep 17 00:00:00 2001 +From: Weibin Yao <yaoweibin@gmail.com> +Date: Fri, 27 Feb 2015 23:13:30 +0800 +Subject: [PATCH] fixed the compatible problem with nginx-1.7.9+ + +--- + ngx_http_ajp.h | 1 + + ngx_http_ajp_module.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 86 insertions(+) + +diff --git a/ngx_http_ajp.h b/ngx_http_ajp.h +index 72502ad..b3c7051 100644 +--- a/ngx_http_ajp.h ++++ b/ngx_http_ajp.h +@@ -5,6 +5,7 @@ + #include <ngx_config.h> + #include <ngx_core.h> + #include <ngx_http.h> ++#include <nginx.h> + #include "ngx_http_ajp_module.h" + + #define AJP13_DEF_HOST "127.0.0.1" +diff --git a/ngx_http_ajp_module.c b/ngx_http_ajp_module.c +index e4d5b00..be32459 100644 +--- a/ngx_http_ajp_module.c ++++ b/ngx_http_ajp_module.c +@@ -464,8 +464,12 @@ ngx_http_ajp_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) + + #if (NGX_HTTP_CACHE) + ++#if (nginx_version >= 1007009) ++ if (alcf->upstream.cache > 0) ++#else + if (alcf->upstream.cache != NGX_CONF_UNSET_PTR + && alcf->upstream.cache != NULL) ++#endif + { + return "is incompatible with \"ajp_cache\""; + } +@@ -534,15 +538,27 @@ ngx_http_ajp_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) + ngx_http_ajp_loc_conf_t *alcf = conf; + + ngx_str_t *value; ++#if (nginx_version >= 1007009) ++ ngx_http_complex_value_t cv; ++ ngx_http_compile_complex_value_t ccv; ++#endif + + value = cf->args->elts; + ++#if (nginx_version >= 1007009) ++ if (alcf->upstream.cache != NGX_CONF_UNSET) { ++#else + if (alcf->upstream.cache != NGX_CONF_UNSET_PTR) { ++#endif + return "is duplicate"; + } + + if (ngx_strcmp(value[1].data, "off") == 0) { ++#if (nginx_version >= 1007009) ++ alcf->upstream.cache = 0; ++#else + alcf->upstream.cache = NULL; ++#endif + return NGX_CONF_OK; + } + +@@ -550,11 +566,44 @@ ngx_http_ajp_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) + return "is incompatible with \"ajp_store\""; + } + ++#if (nginx_version >= 1007009) ++ alcf->upstream.cache = 1; ++ ++ ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); ++ ++ ccv.cf = cf; ++ ccv.value = &value[1]; ++ ccv.complex_value = &cv; ++ ++ if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { ++ return NGX_CONF_ERROR; ++ } ++ ++ if (cv.lengths != NULL) { ++ ++ alcf->upstream.cache_value = ngx_palloc(cf->pool, ++ sizeof(ngx_http_complex_value_t)); ++ if (alcf->upstream.cache_value == NULL) { ++ return NGX_CONF_ERROR; ++ } ++ ++ *alcf->upstream.cache_value = cv; ++ ++ return NGX_CONF_OK; ++ } ++ ++ alcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0, ++ &ngx_http_ajp_module); ++ if (alcf->upstream.cache_zone == NULL) { ++ return NGX_CONF_ERROR; ++ } ++#else + alcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, + &ngx_http_ajp_module); + if (alcf->upstream.cache == NULL) { + return NGX_CONF_ERROR; + } ++#endif + + return NGX_CONF_OK; + } +@@ -666,7 +715,11 @@ ngx_http_ajp_create_loc_conf(ngx_conf_t *cf) + conf->upstream.pass_request_body = NGX_CONF_UNSET; + + #if (NGX_HTTP_CACHE) ++#if (nginx_version >= 1007009) ++ conf->upstream.cache = NGX_CONF_UNSET; ++#else + conf->upstream.cache = NGX_CONF_UNSET_PTR; ++#endif + conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; + conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; + conf->upstream.cache_lock = NGX_CONF_UNSET; +@@ -699,6 +752,18 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) + ngx_str_t *h; + ngx_hash_init_t hash; + ++#if (NGX_HTTP_CACHE) && (nginx_version >= 1007009) ++ ++ if (conf->upstream.store > 0) { ++ conf->upstream.cache = 0; ++ } ++ ++ if (conf->upstream.cache > 0) { ++ conf->upstream.store = 0; ++ } ++ ++#endif ++ + if (conf->upstream.store != 0) { + ngx_conf_merge_value(conf->upstream.store, + prev->upstream.store, 0); +@@ -864,6 +929,20 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) + + #if (NGX_HTTP_CACHE) + ++#if (nginx_version >= 1007009) ++ if (conf->upstream.cache == NGX_CONF_UNSET) { ++ ngx_conf_merge_value(conf->upstream.cache, ++ prev->upstream.cache, 0); ++ ++ conf->upstream.cache_zone = prev->upstream.cache_zone; ++ conf->upstream.cache_value = prev->upstream.cache_value; ++ } ++ ++ if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) { ++ ngx_shm_zone_t *shm_zone; ++ ++ shm_zone = conf->upstream.cache_zone; ++#else + ngx_conf_merge_ptr_value(conf->upstream.cache, + prev->upstream.cache, NULL); + +@@ -871,6 +950,7 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) + ngx_shm_zone_t *shm_zone; + + shm_zone = conf->upstream.cache; ++#endif + + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "\"ajp_cache\" zone \"%V\" is unknown, " +@@ -910,6 +990,11 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) + conf->cache_key = prev->cache_key; + } + ++ if (conf->upstream.cache && conf->cache_key.value.data == NULL) { ++ ngx_conf_log_error(NGX_LOG_WARN, cf, 0, ++ "no \"fastcgi_cache_key\" for \"fastcgi_cache\""); ++ } ++ + ngx_conf_merge_value(conf->upstream.cache_lock, + prev->upstream.cache_lock, 0); + |