comparison src/http/modules/ngx_http_proxy_module.c @ 324:f7cd062ee035 NGINX_0_6_6

nginx 0.6.6 *) Feature: the --sysconfdir=PATH option in configure. *) Feature: named locations. *) Feature: the $args variable can be set with the "set" directive. *) Feature: the $is_args variable. *) Bugfix: fair big weight upstream balancer. *) Bugfix: if a client has closed connection to mail proxy then nginx might not close connection to backend. *) Bugfix: if the same host without specified port was used as backend for HTTP and HTTPS, then nginx used only one port - 80 or 443. *) Bugfix: fix building on Solaris/amd64 by Sun Studio 11 and early versions; bug appeared in 0.6.4.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jul 2007 00:00:00 +0400
parents 95183808f549
children 1c519aff5c0c
comparison
equal deleted inserted replaced
323:7e977a664d91 324:f7cd062ee035
2235 plcf->host_header = u.host; 2235 plcf->host_header = u.host;
2236 2236
2237 if (port == 80) { 2237 if (port == 80) {
2238 plcf->port.len = sizeof("80") - 1; 2238 plcf->port.len = sizeof("80") - 1;
2239 plcf->port.data = (u_char *) "80"; 2239 plcf->port.data = (u_char *) "80";
2240
2240 } else { 2241 } else {
2241 plcf->port.len = sizeof("443") - 1; 2242 plcf->port.len = sizeof("443") - 1;
2242 plcf->port.data = (u_char *) "443"; 2243 plcf->port.data = (u_char *) "443";
2243 } 2244 }
2244 2245
2273 2274
2274 clcf->handler = ngx_http_proxy_handler; 2275 clcf->handler = ngx_http_proxy_handler;
2275 2276
2276 plcf->upstream.location = clcf->name; 2277 plcf->upstream.location = clcf->name;
2277 2278
2279 if (clcf->named
2278 #if (NGX_PCRE) 2280 #if (NGX_PCRE)
2279 2281 || clcf->regex
2280 if (clcf->regex || clcf->noname) { 2282 #endif
2283 || clcf->noname)
2284 {
2281 if (plcf->upstream.uri.len) { 2285 if (plcf->upstream.uri.len) {
2282 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 2286 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
2283 "\"proxy_pass\" may not have URI part in " 2287 "\"proxy_pass\" may not have URI part in "
2284 "location given by regular expression, " 2288 "location given by regular expression, "
2289 "or inside named location, "
2285 "or inside the \"if\" statement, " 2290 "or inside the \"if\" statement, "
2286 "or inside the \"limit_except\" block"); 2291 "or inside the \"limit_except\" block");
2287 return NGX_CONF_ERROR; 2292 return NGX_CONF_ERROR;
2288 } 2293 }
2289 2294
2290 plcf->upstream.location.len = 0; 2295 plcf->upstream.location.len = 0;
2291 } 2296 }
2292
2293 #endif
2294 2297
2295 plcf->upstream.url = *url; 2298 plcf->upstream.url = *url;
2296 2299
2297 if (clcf->name.data[clcf->name.len - 1] == '/') { 2300 if (clcf->name.data[clcf->name.len - 1] == '/') {
2298 clcf->auto_redirect = 1; 2301 clcf->auto_redirect = 1;