Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 7831:bdd4d89370a7
Changed complex value slots to use NGX_CONF_UNSET_PTR.
With this change, it is now possible to use ngx_conf_merge_ptr_value()
to merge complex values. This change follows much earlier changes in
ngx_conf_merge_ptr_value() and ngx_conf_set_str_array_slot()
in 1452:cd586e963db0 (0.6.10) and 1701:40d004d95d88 (0.6.22), and the
change in ngx_conf_set_keyval_slot() (7728:485dba3e2a01, 1.19.4).
To preserve compatibility with existing 3rd party modules, both NULL
and NGX_CONF_UNSET_PTR are accepted for now.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 06 May 2021 02:22:03 +0300 |
parents | 82e174e47663 |
children | 1bde031b59ff |
comparison
equal
deleted
inserted
replaced
7830:f2ff291bbdac | 7831:bdd4d89370a7 |
---|---|
3477 * clcf->client_body_path = NULL; | 3477 * clcf->client_body_path = NULL; |
3478 * clcf->regex = NULL; | 3478 * clcf->regex = NULL; |
3479 * clcf->exact_match = 0; | 3479 * clcf->exact_match = 0; |
3480 * clcf->auto_redirect = 0; | 3480 * clcf->auto_redirect = 0; |
3481 * clcf->alias = 0; | 3481 * clcf->alias = 0; |
3482 * clcf->limit_rate = NULL; | |
3483 * clcf->limit_rate_after = NULL; | |
3484 * clcf->gzip_proxied = 0; | 3482 * clcf->gzip_proxied = 0; |
3485 * clcf->keepalive_disable = 0; | 3483 * clcf->keepalive_disable = 0; |
3486 */ | 3484 */ |
3487 | 3485 |
3488 clcf->client_max_body_size = NGX_CONF_UNSET; | 3486 clcf->client_max_body_size = NGX_CONF_UNSET; |
3510 clcf->tcp_nopush = NGX_CONF_UNSET; | 3508 clcf->tcp_nopush = NGX_CONF_UNSET; |
3511 clcf->tcp_nodelay = NGX_CONF_UNSET; | 3509 clcf->tcp_nodelay = NGX_CONF_UNSET; |
3512 clcf->send_timeout = NGX_CONF_UNSET_MSEC; | 3510 clcf->send_timeout = NGX_CONF_UNSET_MSEC; |
3513 clcf->send_lowat = NGX_CONF_UNSET_SIZE; | 3511 clcf->send_lowat = NGX_CONF_UNSET_SIZE; |
3514 clcf->postpone_output = NGX_CONF_UNSET_SIZE; | 3512 clcf->postpone_output = NGX_CONF_UNSET_SIZE; |
3513 clcf->limit_rate = NGX_CONF_UNSET_PTR; | |
3514 clcf->limit_rate_after = NGX_CONF_UNSET_PTR; | |
3515 clcf->keepalive_time = NGX_CONF_UNSET_MSEC; | 3515 clcf->keepalive_time = NGX_CONF_UNSET_MSEC; |
3516 clcf->keepalive_timeout = NGX_CONF_UNSET_MSEC; | 3516 clcf->keepalive_timeout = NGX_CONF_UNSET_MSEC; |
3517 clcf->keepalive_header = NGX_CONF_UNSET; | 3517 clcf->keepalive_header = NGX_CONF_UNSET; |
3518 clcf->keepalive_requests = NGX_CONF_UNSET_UINT; | 3518 clcf->keepalive_requests = NGX_CONF_UNSET_UINT; |
3519 clcf->lingering_close = NGX_CONF_UNSET_UINT; | 3519 clcf->lingering_close = NGX_CONF_UNSET_UINT; |
3741 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); | 3741 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); |
3742 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); | 3742 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); |
3743 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, | 3743 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, |
3744 1460); | 3744 1460); |
3745 | 3745 |
3746 if (conf->limit_rate == NULL) { | 3746 ngx_conf_merge_ptr_value(conf->limit_rate, prev->limit_rate, NULL); |
3747 conf->limit_rate = prev->limit_rate; | 3747 ngx_conf_merge_ptr_value(conf->limit_rate_after, |
3748 } | 3748 prev->limit_rate_after, NULL); |
3749 | |
3750 if (conf->limit_rate_after == NULL) { | |
3751 conf->limit_rate_after = prev->limit_rate_after; | |
3752 } | |
3753 | 3749 |
3754 ngx_conf_merge_msec_value(conf->keepalive_time, | 3750 ngx_conf_merge_msec_value(conf->keepalive_time, |
3755 prev->keepalive_time, 3600000); | 3751 prev->keepalive_time, 3600000); |
3756 ngx_conf_merge_msec_value(conf->keepalive_timeout, | 3752 ngx_conf_merge_msec_value(conf->keepalive_timeout, |
3757 prev->keepalive_timeout, 75000); | 3753 prev->keepalive_timeout, 75000); |