Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fixed "down" and "backup" parsing.

Maxim Dounin
October 02, 2013 07:10AM
details: http://hg.nginx.org/nginx/rev/16b68c724438
branches:
changeset: 5410:16b68c724438
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Oct 02 15:07:15 2013 +0400
description:
Upstream: fixed "down" and "backup" parsing.

Previously arguments starting with "down" or "backup" were considered
valid, e.g. "server ... downFOO;".

diffstat:

src/http/ngx_http_upstream.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4701,7 +4701,7 @@ ngx_http_upstream_server(ngx_conf_t *cf,
continue;
}

- if (ngx_strncmp(value[i].data, "backup", 6) == 0) {
+ if (ngx_strcmp(value[i].data, "backup") == 0) {

if (!(uscf->flags & NGX_HTTP_UPSTREAM_BACKUP)) {
goto invalid;
@@ -4712,7 +4712,7 @@ ngx_http_upstream_server(ngx_conf_t *cf,
continue;
}

- if (ngx_strncmp(value[i].data, "down", 4) == 0) {
+ if (ngx_strcmp(value[i].data, "down") == 0) {

if (!(uscf->flags & NGX_HTTP_UPSTREAM_DOWN)) {
goto invalid;

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

[nginx] Upstream: fixed "down" and "backup" parsing.

Maxim Dounin 968 October 02, 2013 07:10AM



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

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready