Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_upstream_round_robin.c @ 266:251bcd11a5b8 NGINX_0_5_3
nginx 0.5.3
*) Feature: the ngx_http_perl_module supports the $r->status,
$r->log_error, and $r->sleep methods.
*) Feature: the $r->variable method supports variables that do not
exist in nginx configuration.
*) Bugfix: the $r->has_request_body method did not work.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 13 Dec 2006 00:00:00 +0300 |
parents | e0b1d0a6c629 |
children | 9b7db0df50f0 |
comparison
equal
deleted
inserted
replaced
265:3d4634b3b321 | 266:251bcd11a5b8 |
---|---|
59 } | 59 } |
60 | 60 |
61 | 61 |
62 /* an upstream implicitly defined by proxy_pass, etc. */ | 62 /* an upstream implicitly defined by proxy_pass, etc. */ |
63 | 63 |
64 if (us->port == 0 && us->default_port == 0) { | |
65 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | |
66 "no port in upstream \"%V\" in %s:%ui", | |
67 &us->host, us->file_name.data, us->line); | |
68 return NGX_ERROR; | |
69 } | |
70 | |
64 ngx_memzero(&u, sizeof(ngx_url_t)); | 71 ngx_memzero(&u, sizeof(ngx_url_t)); |
65 | 72 |
66 u.host = us->host; | 73 u.host = us->host; |
67 u.portn = us->port; | 74 u.port = (in_port_t) (us->port ? us->port : us->default_port); |
68 | 75 |
69 if (ngx_inet_resolve_host(cf, &u) != NGX_OK) { | 76 if (ngx_inet_resolve_host(cf, &u) != NGX_OK) { |
70 if (u.err) { | 77 if (u.err) { |
71 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 78 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
72 "%s in upstream \"%V\" in %s:%ui", | 79 "%s in upstream \"%V\" in %s:%ui", |
73 u.err, &us->host, us->file_name.data, us->line); | 80 u.err, &us->host, us->file_name.data, us->line); |
74 } | 81 } |
75 | 82 |
76 return NGX_ERROR; | |
77 } | |
78 | |
79 if (us->port == 0) { | |
80 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | |
81 "no port in upstream \"%V\" in %s:%ui", | |
82 &us->host, us->file_name.data, us->line); | |
83 return NGX_ERROR; | 83 return NGX_ERROR; |
84 } | 84 } |
85 | 85 |
86 n = u.naddrs; | 86 n = u.naddrs; |
87 | 87 |