Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5410:16b68c724438
Upstream: fixed "down" and "backup" parsing.
Previously arguments starting with "down" or "backup" were considered
valid, e.g. "server ... downFOO;".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 02 Oct 2013 15:07:15 +0400 |
parents | f1caf7b8ae1d |
children | 43ccaf8e8728 |
comparison
equal
deleted
inserted
replaced
5409:11599a3d0c7c | 5410:16b68c724438 |
---|---|
4699 } | 4699 } |
4700 | 4700 |
4701 continue; | 4701 continue; |
4702 } | 4702 } |
4703 | 4703 |
4704 if (ngx_strncmp(value[i].data, "backup", 6) == 0) { | 4704 if (ngx_strcmp(value[i].data, "backup") == 0) { |
4705 | 4705 |
4706 if (!(uscf->flags & NGX_HTTP_UPSTREAM_BACKUP)) { | 4706 if (!(uscf->flags & NGX_HTTP_UPSTREAM_BACKUP)) { |
4707 goto invalid; | 4707 goto invalid; |
4708 } | 4708 } |
4709 | 4709 |
4710 us->backup = 1; | 4710 us->backup = 1; |
4711 | 4711 |
4712 continue; | 4712 continue; |
4713 } | 4713 } |
4714 | 4714 |
4715 if (ngx_strncmp(value[i].data, "down", 4) == 0) { | 4715 if (ngx_strcmp(value[i].data, "down") == 0) { |
4716 | 4716 |
4717 if (!(uscf->flags & NGX_HTTP_UPSTREAM_DOWN)) { | 4717 if (!(uscf->flags & NGX_HTTP_UPSTREAM_DOWN)) { |
4718 goto invalid; | 4718 goto invalid; |
4719 } | 4719 } |
4720 | 4720 |