comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 36:a39d1b793287 NGINX_0_1_18

nginx 0.1.18 *) Workaround: the default values of the devpoll_events and the devpoll_changes directives changed from 512 to 32 to be compatible with Solaris 10. *) Bugfix: the proxy_set_x_var and fastcgi_set_var directives were not inherited. *) Bugfix: in the redirect rewrite directive the arguments were concatenated with URI by the "&" rather than the "?". *) Bugfix: the lines without trailing ";" in the file being included by the ngx_http_geo_module were silently ignored. *) Feature: the ngx_http_stub_status_module. *) Bugfix: the unknown log format in the access_log directive caused the segmentation fault. *) Feature: the new "document_root" parameter of the fastcgi_params directive. *) Feature: the fastcgi_redirect_errors directive. *) Feature: the new "break" modifier of the "rewrite" directive allows to stop the rewrite/location cycle and sets the current configuration to the request.
author Igor Sysoev <http://sysoev.ru>
date Wed, 09 Feb 2005 00:00:00 +0300
parents aab2ea7c0458
children 72eb30262aac
comparison
equal deleted inserted replaced
35:ef53675fe4a6 36:a39d1b793287
1282 prev->pass_x_accel_expires, 0); 1282 prev->pass_x_accel_expires, 0);
1283 ngx_conf_merge_value(conf->ignore_expires, prev->ignore_expires, 0); 1283 ngx_conf_merge_value(conf->ignore_expires, prev->ignore_expires, 0);
1284 ngx_conf_merge_value(conf->lm_factor, prev->lm_factor, 0); 1284 ngx_conf_merge_value(conf->lm_factor, prev->lm_factor, 0);
1285 ngx_conf_merge_sec_value(conf->default_expires, prev->default_expires, 0); 1285 ngx_conf_merge_sec_value(conf->default_expires, prev->default_expires, 0);
1286 1286
1287 if (conf->x_vars == NULL) {
1288 conf->x_vars = prev->x_vars;
1289 }
1290
1287 return NULL; 1291 return NULL;
1288 } 1292 }
1289 1293
1290 1294
1291 static char *ngx_http_proxy_set_pass(ngx_conf_t *cf, ngx_command_t *cmd, 1295 static char *ngx_http_proxy_set_pass(ngx_conf_t *cf, ngx_command_t *cmd,
1387 ngx_uint_t i, *index; 1391 ngx_uint_t i, *index;
1388 ngx_str_t *value; 1392 ngx_str_t *value;
1389 ngx_http_variable_t *var; 1393 ngx_http_variable_t *var;
1390 ngx_http_core_main_conf_t *cmcf; 1394 ngx_http_core_main_conf_t *cmcf;
1391 1395
1392 if (lcf->x_vars.elts == NULL) { 1396 if (lcf->x_vars == NULL) {
1393 if (ngx_array_init(&lcf->x_vars, cf->pool, 4, 1397 lcf->x_vars = ngx_array_create(cf->pool, 4,
1394 sizeof(ngx_http_variable_t *)) == NGX_ERROR) 1398 sizeof(ngx_http_variable_t *));
1395 { 1399 if (lcf->x_vars == NULL) {
1396 return NGX_CONF_ERROR; 1400 return NGX_CONF_ERROR;
1397 } 1401 }
1398 } 1402 }
1399 1403
1400 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); 1404 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
1403 1407
1404 var = cmcf->variables.elts; 1408 var = cmcf->variables.elts;
1405 for (i = 0; i < cmcf->variables.nelts; i++) { 1409 for (i = 0; i < cmcf->variables.nelts; i++) {
1406 if (ngx_strcasecmp(var[i].name.data, value[1].data) == 0) { 1410 if (ngx_strcasecmp(var[i].name.data, value[1].data) == 0) {
1407 1411
1408 if (!(index = ngx_array_push(&lcf->x_vars))) { 1412 if (!(index = ngx_array_push(lcf->x_vars))) {
1409 return NGX_CONF_ERROR; 1413 return NGX_CONF_ERROR;
1410 } 1414 }
1411 1415
1412 *index = var[i].index; 1416 *index = var[i].index;
1413 return NGX_CONF_OK; 1417 return NGX_CONF_OK;