diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2013-10-02 15:07:15 +0400 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-10-02 15:07:15 +0400 |
| commit | 31d023e53e75097b7ee75fc4b52383aa989c5325 (patch) | |
| tree | 9f47853979e5f1d0d572767bc1443d7add8f7273 /src | |
| parent | cfb2b55e8d3e5d9e9da87ad7dd2258c3c571cbb1 (diff) | |
| download | nginx-31d023e53e75097b7ee75fc4b52383aa989c5325.tar.gz nginx-31d023e53e75097b7ee75fc4b52383aa989c5325.tar.bz2 | |
Upstream: fixed "down" and "backup" parsing.
Previously arguments starting with "down" or "backup" were considered
valid, e.g. "server ... downFOO;".
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 4a4f8eba2..88d84c9cc 100644 --- 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, ngx_command_t *cmd, void *conf) 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, ngx_command_t *cmd, void *conf) 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; |
