# HG changeset patch # User Maxim Dounin # Date 1380712035 -14400 # Node ID 16b68c7244382f32fe707d22ab947aba5ef5808e # Parent 11599a3d0c7ce35f6b890dd79429e257d1b77a63 Upstream: fixed "down" and "backup" parsing. Previously arguments starting with "down" or "backup" were considered valid, e.g. "server ... downFOO;". 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;