Mercurial > hg > nginx-mail
comparison src/http/modules/ngx_http_proxy_module.c @ 340:10cc350ed8a1 NGINX_0_6_14
nginx 0.6.14
*) Change: now by default the "echo" SSI command uses entity encoding.
*) Feature: the "encoding" parameter in the "echo" SSI command.
*) Feature: the "access_log" directive may be used inside the
"limit_except" block.
*) Bugfix: if all upstream servers were failed, then all servers had
got weight the was equal one until servers became alive; bug
appeared in 0.6.6.
*) Bugfix: a segmentation fault occurred in worker process if
$date_local and $date_gmt were used outside the
ngx_http_ssi_filter_module.
*) Bugfix: a segmentation fault might occur in worker process if debug
log was enabled.
Thanks to Andrei Nigmatulin.
*) Bugfix: ngx_http_memcached_module did not set
$upstream_response_time.
Thanks to Maxim Dounin.
*) Bugfix: a worker process may got caught in an endless loop, if the
memcached was used.
*) Bugfix: nginx supported low case only "close" and "keep-alive"
values in the "Connection" request header line; bug appeared in
0.6.11.
*) Bugfix: sub_filter did not work with empty substitution.
*) Bugfix: in sub_filter parsing.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 15 Oct 2007 00:00:00 +0400 |
parents | 1c519aff5c0c |
children | 05693816539c |
comparison
equal
deleted
inserted
replaced
339:d19550b67059 | 340:10cc350ed8a1 |
---|---|
418 | 418 |
419 | 419 |
420 static ngx_http_variable_t ngx_http_proxy_vars[] = { | 420 static ngx_http_variable_t ngx_http_proxy_vars[] = { |
421 | 421 |
422 { ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0, | 422 { ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0, |
423 NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 }, | 423 NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH, 0 }, |
424 | 424 |
425 { ngx_string("proxy_port"), NULL, ngx_http_proxy_port_variable, 0, | 425 { ngx_string("proxy_port"), NULL, ngx_http_proxy_port_variable, 0, |
426 NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 }, | 426 NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH, 0 }, |
427 | 427 |
428 { ngx_string("proxy_add_x_forwarded_for"), NULL, | 428 { ngx_string("proxy_add_x_forwarded_for"), NULL, |
429 ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 }, | 429 ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 }, |
430 | 430 |
431 #if 0 | 431 #if 0 |
559 } | 559 } |
560 | 560 |
561 len += r->uri.len - loc_len + escape + sizeof("?") - 1 + r->args.len; | 561 len += r->uri.len - loc_len + escape + sizeof("?") - 1 + r->args.len; |
562 } | 562 } |
563 | 563 |
564 ngx_http_script_flush_no_cachable_variables(r, plcf->flushes); | 564 ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes); |
565 | 565 |
566 if (plcf->body_set_len) { | 566 if (plcf->body_set_len) { |
567 le.ip = plcf->body_set_len->elts; | 567 le.ip = plcf->body_set_len->elts; |
568 le.request = r; | 568 le.request = r; |
569 le.flushed = 1; | 569 le.flushed = 1; |
1247 | 1247 |
1248 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); | 1248 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); |
1249 | 1249 |
1250 v->len = plcf->host_header.len; | 1250 v->len = plcf->host_header.len; |
1251 v->valid = 1; | 1251 v->valid = 1; |
1252 v->no_cachable = 0; | 1252 v->no_cacheable = 0; |
1253 v->not_found = 0; | 1253 v->not_found = 0; |
1254 v->data = plcf->host_header.data; | 1254 v->data = plcf->host_header.data; |
1255 | 1255 |
1256 return NGX_OK; | 1256 return NGX_OK; |
1257 } | 1257 } |
1265 | 1265 |
1266 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); | 1266 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); |
1267 | 1267 |
1268 v->len = plcf->port.len; | 1268 v->len = plcf->port.len; |
1269 v->valid = 1; | 1269 v->valid = 1; |
1270 v->no_cachable = 0; | 1270 v->no_cacheable = 0; |
1271 v->not_found = 0; | 1271 v->not_found = 0; |
1272 v->data = plcf->port.data; | 1272 v->data = plcf->port.data; |
1273 | 1273 |
1274 return NGX_OK; | 1274 return NGX_OK; |
1275 } | 1275 } |
1280 ngx_http_variable_value_t *v, uintptr_t data) | 1280 ngx_http_variable_value_t *v, uintptr_t data) |
1281 { | 1281 { |
1282 u_char *p; | 1282 u_char *p; |
1283 | 1283 |
1284 v->valid = 1; | 1284 v->valid = 1; |
1285 v->no_cachable = 0; | 1285 v->no_cacheable = 0; |
1286 v->not_found = 0; | 1286 v->not_found = 0; |
1287 | 1287 |
1288 if (r->headers_in.x_forwarded_for == NULL) { | 1288 if (r->headers_in.x_forwarded_for == NULL) { |
1289 v->len = r->connection->addr_text.len; | 1289 v->len = r->connection->addr_text.len; |
1290 v->data = r->connection->addr_text.data; | 1290 v->data = r->connection->addr_text.data; |
1324 v->not_found = 1; | 1324 v->not_found = 1; |
1325 return NGX_OK; | 1325 return NGX_OK; |
1326 } | 1326 } |
1327 | 1327 |
1328 v->valid = 1; | 1328 v->valid = 1; |
1329 v->no_cachable = 0; | 1329 v->no_cacheable = 0; |
1330 v->not_found = 0; | 1330 v->not_found = 0; |
1331 | 1331 |
1332 v->data = ngx_palloc(r->connection->pool, NGX_SIZE_T_LEN); | 1332 v->data = ngx_palloc(r->connection->pool, NGX_SIZE_T_LEN); |
1333 | 1333 |
1334 if (v->data == NULL) { | 1334 if (v->data == NULL) { |
2427 | 2427 |
2428 sc.cf = cf; | 2428 sc.cf = cf; |
2429 sc.source = &value[1]; | 2429 sc.source = &value[1]; |
2430 sc.lengths = &plcf->upstream.store_lengths; | 2430 sc.lengths = &plcf->upstream.store_lengths; |
2431 sc.values = &plcf->upstream.store_values; | 2431 sc.values = &plcf->upstream.store_values; |
2432 sc.variables = ngx_http_script_variables_count(&value[1]);; | 2432 sc.variables = ngx_http_script_variables_count(&value[1]); |
2433 sc.complete_lengths = 1; | 2433 sc.complete_lengths = 1; |
2434 sc.complete_values = 1; | 2434 sc.complete_values = 1; |
2435 | 2435 |
2436 if (ngx_http_script_compile(&sc) != NGX_OK) { | 2436 if (ngx_http_script_compile(&sc) != NGX_OK) { |
2437 return NGX_CONF_ERROR; | 2437 return NGX_CONF_ERROR; |