comparison src/http/modules/ngx_http_geo_module.c @ 7214:88aad69eccef

Geo: optimized configuration parser. If the geo block parser has failed, doing more things is pointless.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 21 Feb 2018 15:50:43 +0300
parents c69c13f10502
children 286ae954009d
comparison
equal deleted inserted replaced
7213:c69c13f10502 7214:88aad69eccef
459 459
460 rv = ngx_conf_parse(cf, NULL); 460 rv = ngx_conf_parse(cf, NULL);
461 461
462 *cf = save; 462 *cf = save;
463 463
464 if (rv != NGX_CONF_OK) {
465 goto failed;
466 }
467
464 geo->proxies = ctx.proxies; 468 geo->proxies = ctx.proxies;
465 geo->proxy_recursive = ctx.proxy_recursive; 469 geo->proxy_recursive = ctx.proxy_recursive;
466 470
467 if (ctx.ranges) { 471 if (ctx.ranges) {
468 472
553 } 557 }
554 558
555 ngx_destroy_pool(ctx.temp_pool); 559 ngx_destroy_pool(ctx.temp_pool);
556 ngx_destroy_pool(pool); 560 ngx_destroy_pool(pool);
557 561
558 return rv; 562 return NGX_CONF_OK;
559 563
560 failed: 564 failed:
561 565
562 ngx_destroy_pool(ctx.temp_pool); 566 ngx_destroy_pool(ctx.temp_pool);
563 ngx_destroy_pool(pool); 567 ngx_destroy_pool(pool);