No functional changes.
static void *ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf,
void *parent, void *child);
-static ngx_int_t ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
- ngx_http_fastcgi_loc_conf_t *conf, ngx_http_fastcgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_fastcgi_init_params(ngx_conf_t *cf,
+ ngx_http_fastcgi_loc_conf_t *conf);
static ngx_int_t ngx_http_fastcgi_script_name_variable(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
}
#endif
- if (ngx_http_fastcgi_merge_params(cf, conf, prev) != NGX_OK) {
+ if (conf->params_source == NULL) {
+ conf->params_source = prev->params_source;
+
+#if (NGX_HTTP_CACHE)
+ if ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
+#endif
+ {
+ conf->flushes = prev->flushes;
+ conf->params_len = prev->params_len;
+ conf->params = prev->params;
+ conf->headers_hash = prev->headers_hash;
+ conf->header_params = prev->header_params;
+ }
+ }
+
+ if (ngx_http_fastcgi_init_params(cf, conf) != NGX_OK) {
return NGX_CONF_ERROR;
}
static ngx_int_t
-ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
- ngx_http_fastcgi_loc_conf_t *conf, ngx_http_fastcgi_loc_conf_t *prev)
+ngx_http_fastcgi_init_params(ngx_conf_t *cf, ngx_http_fastcgi_loc_conf_t *conf)
{
u_char *p;
size_t size;
ngx_http_script_compile_t sc;
ngx_http_script_copy_code_t *copy;
- if (conf->params_source == NULL) {
- conf->params_source = prev->params_source;
-
- if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
- && ((conf->upstream.cache == NULL)
- == (prev->upstream.cache == NULL))
-#endif
- )
- {
- conf->flushes = prev->flushes;
- conf->params_len = prev->params_len;
- conf->params = prev->params;
- conf->headers_hash = prev->headers_hash;
- conf->header_params = prev->header_params;
-
- return NGX_OK;
- }
+ if (conf->headers_hash.buckets) {
+ return NGX_OK;
}
if (conf->params_source == NULL
static void *ngx_http_proxy_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf,
void *parent, void *child);
-static ngx_int_t ngx_http_proxy_merge_headers(ngx_conf_t *cf,
- ngx_http_proxy_loc_conf_t *conf, ngx_http_proxy_loc_conf_t *prev);
+static ngx_int_t ngx_http_proxy_init_headers(ngx_conf_t *cf,
+ ngx_http_proxy_loc_conf_t *conf);
static char *ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
}
}
- if (ngx_http_proxy_merge_headers(cf, conf, prev) != NGX_OK) {
+ if (conf->headers_source == NULL) {
+ conf->flushes = prev->flushes;
+ conf->headers_set_len = prev->headers_set_len;
+ conf->headers_set = prev->headers_set;
+ conf->headers_set_hash = prev->headers_set_hash;
+ conf->headers_source = prev->headers_source;
+ }
+
+#if (NGX_HTTP_CACHE)
+ if ((conf->upstream.cache == NULL) != (prev->upstream.cache == NULL)) {
+ conf->headers_set_hash.buckets = NULL;
+ }
+#endif
+
+ if (ngx_http_proxy_init_headers(cf, conf) != NGX_OK) {
return NGX_CONF_ERROR;
}
static ngx_int_t
-ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
- ngx_http_proxy_loc_conf_t *prev)
+ngx_http_proxy_init_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf)
{
u_char *p;
size_t size;
ngx_http_script_compile_t sc;
ngx_http_script_copy_code_t *copy;
- if (conf->headers_source == NULL) {
- conf->flushes = prev->flushes;
- conf->headers_set_len = prev->headers_set_len;
- conf->headers_set = prev->headers_set;
- conf->headers_set_hash = prev->headers_set_hash;
- conf->headers_source = prev->headers_source;
- }
-
- if (conf->headers_set_hash.buckets
-#if (NGX_HTTP_CACHE)
- && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
-#endif
- )
- {
+ if (conf->headers_set_hash.buckets) {
return NGX_OK;
}
-
if (ngx_array_init(&headers_names, cf->temp_pool, 4, sizeof(ngx_hash_key_t))
!= NGX_OK)
{
static void *ngx_http_scgi_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent,
void *child);
-static ngx_int_t ngx_http_scgi_merge_params(ngx_conf_t *cf,
- ngx_http_scgi_loc_conf_t *conf, ngx_http_scgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_scgi_init_params(ngx_conf_t *cf,
+ ngx_http_scgi_loc_conf_t *conf);
static char *ngx_http_scgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
static char *ngx_http_scgi_store(ngx_conf_t *cf, ngx_command_t *cmd,
}
}
- if (ngx_http_scgi_merge_params(cf, conf, prev) != NGX_OK) {
+ if (conf->params_source == NULL) {
+ conf->params_source = prev->params_source;
+
+#if (NGX_HTTP_CACHE)
+ if ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
+#endif
+ {
+ conf->flushes = prev->flushes;
+ conf->params_len = prev->params_len;
+ conf->params = prev->params;
+ conf->headers_hash = prev->headers_hash;
+ conf->header_params = prev->header_params;
+ }
+ }
+
+ if (ngx_http_scgi_init_params(cf, conf) != NGX_OK) {
return NGX_CONF_ERROR;
}
static ngx_int_t
-ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
- ngx_http_scgi_loc_conf_t *prev)
+ngx_http_scgi_init_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf)
{
u_char *p;
size_t size;
ngx_http_script_compile_t sc;
ngx_http_script_copy_code_t *copy;
- if (conf->params_source == NULL) {
- conf->params_source = prev->params_source;
-
- if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
- && ((conf->upstream.cache == NULL)
- == (prev->upstream.cache == NULL))
-#endif
- )
- {
- conf->flushes = prev->flushes;
- conf->params_len = prev->params_len;
- conf->params = prev->params;
- conf->headers_hash = prev->headers_hash;
- conf->header_params = prev->header_params;
-
- return NGX_OK;
- }
+ if (conf->headers_hash.buckets) {
+ return NGX_OK;
}
if (conf->params_source == NULL
static void *ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent,
void *child);
-static ngx_int_t ngx_http_uwsgi_merge_params(ngx_conf_t *cf,
- ngx_http_uwsgi_loc_conf_t *conf, ngx_http_uwsgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_uwsgi_init_params(ngx_conf_t *cf,
+ ngx_http_uwsgi_loc_conf_t *conf);
static char *ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
ngx_conf_merge_uint_value(conf->modifier1, prev->modifier1, 0);
ngx_conf_merge_uint_value(conf->modifier2, prev->modifier2, 0);
- if (ngx_http_uwsgi_merge_params(cf, conf, prev) != NGX_OK) {
+ if (conf->params_source == NULL) {
+ conf->params_source = prev->params_source;
+
+#if (NGX_HTTP_CACHE)
+ if ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
+#endif
+ {
+ conf->flushes = prev->flushes;
+ conf->params_len = prev->params_len;
+ conf->params = prev->params;
+ conf->headers_hash = prev->headers_hash;
+ conf->header_params = prev->header_params;
+ }
+ }
+
+ if (ngx_http_uwsgi_init_params(cf, conf) != NGX_OK) {
return NGX_CONF_ERROR;
}
static ngx_int_t
-ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
- ngx_http_uwsgi_loc_conf_t *prev)
+ngx_http_uwsgi_init_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf)
{
u_char *p;
size_t size;
ngx_http_script_compile_t sc;
ngx_http_script_copy_code_t *copy;
- if (conf->params_source == NULL) {
- conf->params_source = prev->params_source;
-
- if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
- && ((conf->upstream.cache == NULL)
- == (prev->upstream.cache == NULL))
-#endif
- )
- {
- conf->flushes = prev->flushes;
- conf->params_len = prev->params_len;
- conf->params = prev->params;
- conf->headers_hash = prev->headers_hash;
- conf->header_params = prev->header_params;
-
- return NGX_OK;
- }
+ if (conf->headers_hash.buckets) {
+ return NGX_OK;
}
if (conf->params_source == NULL