Latest update - 7256

This commit is contained in:
Hakase
2018-04-03 17:10:00 +09:00
parent 5c81515f2c
commit 4ead8bdc79
2 changed files with 20 additions and 4 deletions
+2 -2
View File
@@ -6,9 +6,9 @@ TEMP = tmp
CC = cl
OBJS = objs.msvc8
OPENSSL = openssl-1.0.2n
OPENSSL = openssl-1.0.2o
ZLIB = zlib-1.2.11
PCRE = pcre-8.41
PCRE = pcre-8.42
release: export
+18 -2
View File
@@ -2400,7 +2400,8 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
static ngx_int_t
ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u)
{
ngx_uint_t status;
ngx_msec_t timeout;
ngx_uint_t status, mask;
ngx_http_upstream_next_t *un;
status = u->headers_in.status_n;
@@ -2411,7 +2412,22 @@ ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u)
continue;
}
if (u->peer.tries > 1 && (u->conf->next_upstream & un->mask)) {
timeout = u->conf->next_upstream_timeout;
if (u->request_sent
&& (r->method & (NGX_HTTP_POST|NGX_HTTP_LOCK|NGX_HTTP_PATCH)))
{
mask = un->mask | NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT;
} else {
mask = un->mask;
}
if (u->peer.tries > 1
&& ((u->conf->next_upstream & mask) == mask)
&& !(u->request_sent && r->request_body_no_buffering)
&& !(timeout && ngx_current_msec - u->peer.start_time >= timeout))
{
ngx_http_upstream_next(r, u, un->mask);
return NGX_OK;
}