mirror of
https://github.com/nginx/nginx.git
synced 2026-10-21 19:41:35 +00:00
Geo: optimized configuration parser.
If the geo block parser has failed, doing more things is pointless.
This commit is contained in:
parent
f98a8c4db6
commit
7a45918e0b
2 changed files with 10 additions and 2 deletions
|
|
@ -461,6 +461,10 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
*cf = save;
|
||||
|
||||
if (rv != NGX_CONF_OK) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
geo->proxies = ctx.proxies;
|
||||
geo->proxy_recursive = ctx.proxy_recursive;
|
||||
|
||||
|
|
@ -555,7 +559,7 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
ngx_destroy_pool(ctx.temp_pool);
|
||||
ngx_destroy_pool(pool);
|
||||
|
||||
return rv;
|
||||
return NGX_CONF_OK;
|
||||
|
||||
failed:
|
||||
|
||||
|
|
|
|||
|
|
@ -431,6 +431,10 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
*cf = save;
|
||||
|
||||
if (rv != NGX_CONF_OK) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (ctx.ranges) {
|
||||
|
||||
if (ctx.high.low && !ctx.binary_include) {
|
||||
|
|
@ -522,7 +526,7 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
ngx_destroy_pool(ctx.temp_pool);
|
||||
ngx_destroy_pool(pool);
|
||||
|
||||
return rv;
|
||||
return NGX_CONF_OK;
|
||||
|
||||
failed:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue