Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4402 - trunk/src/http/modules

Anonymous User
January 16, 2012 06:02AM
Author: mdounin
Date: 2012-01-16 11:01:52 +0000 (Mon, 16 Jan 2012)
New Revision: 4402

Log:
Fixed proxy_cache_use_stale in "no live upstreams" case.


Modified:
trunk/src/http/modules/ngx_http_fastcgi_module.c
trunk/src/http/modules/ngx_http_proxy_module.c
trunk/src/http/modules/ngx_http_scgi_module.c
trunk/src/http/modules/ngx_http_uwsgi_module.c

Modified: trunk/src/http/modules/ngx_http_fastcgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_fastcgi_module.c 2012-01-11 11:15:00 UTC (rev 4401)
+++ trunk/src/http/modules/ngx_http_fastcgi_module.c 2012-01-16 11:01:52 UTC (rev 4402)
@@ -2314,6 +2314,10 @@
|NGX_HTTP_UPSTREAM_FT_OFF;
}

+ if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
+ conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
+ }
+
if (conf->upstream.cache_methods == 0) {
conf->upstream.cache_methods = prev->upstream.cache_methods;
}

Modified: trunk/src/http/modules/ngx_http_proxy_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_proxy_module.c 2012-01-11 11:15:00 UTC (rev 4401)
+++ trunk/src/http/modules/ngx_http_proxy_module.c 2012-01-16 11:01:52 UTC (rev 4402)
@@ -2685,17 +2685,21 @@
(NGX_CONF_BITMASK_SET
|NGX_HTTP_UPSTREAM_FT_OFF));

+ if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
+ conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
+ |NGX_HTTP_UPSTREAM_FT_OFF;
+ }
+
+ if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
+ conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
+ }
+
if (conf->upstream.cache_methods == 0) {
conf->upstream.cache_methods = prev->upstream.cache_methods;
}

conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;

- if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
- conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
- |NGX_HTTP_UPSTREAM_FT_OFF;
- }
-
ngx_conf_merge_ptr_value(conf->upstream.cache_bypass,
prev->upstream.cache_bypass, NULL);


Modified: trunk/src/http/modules/ngx_http_scgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_scgi_module.c 2012-01-11 11:15:00 UTC (rev 4401)
+++ trunk/src/http/modules/ngx_http_scgi_module.c 2012-01-16 11:01:52 UTC (rev 4402)
@@ -1286,6 +1286,10 @@
|NGX_HTTP_UPSTREAM_FT_OFF;
}

+ if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
+ conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
+ }
+
if (conf->upstream.cache_methods == 0) {
conf->upstream.cache_methods = prev->upstream.cache_methods;
}

Modified: trunk/src/http/modules/ngx_http_uwsgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-01-11 11:15:00 UTC (rev 4401)
+++ trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-01-16 11:01:52 UTC (rev 4402)
@@ -1338,6 +1338,10 @@
|NGX_HTTP_UPSTREAM_FT_OFF;
}

+ if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
+ conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
+ }
+
if (conf->upstream.cache_methods == 0) {
conf->upstream.cache_methods = prev->upstream.cache_methods;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4402 - trunk/src/http/modules

Anonymous User 1415 January 16, 2012 06:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready