Klaus Demo nginx / 73f815e
Headers filter: fixed "add_header ... '' always". The "always" parameter was ignored if the header value was empty. Ruslan Ermilov 6 years ago
1 changed file(s) with 11 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
711711
712712 if (value[2].len == 0) {
713713 ngx_memzero(&hv->value, sizeof(ngx_http_complex_value_t));
714 return NGX_CONF_OK;
715 }
716
717 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
718
719 ccv.cf = cf;
720 ccv.value = &value[2];
721 ccv.complex_value = &hv->value;
722
723 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
724 return NGX_CONF_ERROR;
714
715 } else {
716 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
717
718 ccv.cf = cf;
719 ccv.value = &value[2];
720 ccv.complex_value = &hv->value;
721
722 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
723 return NGX_CONF_ERROR;
724 }
725725 }
726726
727727 if (cf->args->nelts == 3) {