# 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 -r 11599a3d0c7c -r 16b68c724438 src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c Wed Oct 02 11:51:04 2013 +0400 +++ b/src/http/ngx_http_upstream.c Wed Oct 02 15:07:15 2013 +0400 @@ -4701,7 +4701,7 @@ 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 @@ 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;