Mercurial > hg > nginx
comparison src/imap/ngx_imap_auth_http_module.c @ 555:7bd37aef1e7e release-0.2.6
nginx-0.2.6-RELEASE import
*) Change: while using load-balancing the time before the failed
backend retry was decreased from 60 to 10 seconds.
*) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI
now passed, if the URI part is omitted in "proxy_pass" directive.
*) Feature: the "error_page" directive supports redirects and allows
more flexible to change an error code.
*) Change: the charset in the "Content-Type" header line now is ignored
in proxied subrequests.
*) Bugfix: if the URI was changed in the "if" block and request did not
found new configuration, then the ngx_http_rewrite_module rules ran
again.
*) Bugfix: if the "set" directive set the ngx_http_geo_module variable
in some configuration part, the this variable was not available in
other configuration parts and the "using uninitialized variable"
error was occurred; the bug had appeared in 0.2.2.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 05 Oct 2005 14:46:21 +0000 |
parents | 818fbd4750b9 |
children | c1f965ef9718 |
comparison
equal
deleted
inserted
replaced
554:66e18ef48303 | 555:7bd37aef1e7e |
---|---|
1066 static char * | 1066 static char * |
1067 ngx_imap_auth_http(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 1067 ngx_imap_auth_http(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
1068 { | 1068 { |
1069 ngx_imap_auth_http_conf_t *ahcf = conf; | 1069 ngx_imap_auth_http_conf_t *ahcf = conf; |
1070 | 1070 |
1071 ngx_uint_t i; | |
1072 ngx_str_t *value, *url; | 1071 ngx_str_t *value, *url; |
1073 ngx_inet_upstream_t inet_upstream; | 1072 ngx_inet_upstream_t inet_upstream; |
1074 #if (NGX_HAVE_UNIX_DOMAIN) | 1073 #if (NGX_HAVE_UNIX_DOMAIN) |
1075 ngx_unix_domain_upstream_t unix_upstream; | 1074 ngx_unix_domain_upstream_t unix_upstream; |
1076 #endif | 1075 #endif |
1091 | 1090 |
1092 ahcf->peers = ngx_unix_upstream_parse(cf, &unix_upstream); | 1091 ahcf->peers = ngx_unix_upstream_parse(cf, &unix_upstream); |
1093 if (ahcf->peers == NULL) { | 1092 if (ahcf->peers == NULL) { |
1094 return NGX_CONF_ERROR; | 1093 return NGX_CONF_ERROR; |
1095 } | 1094 } |
1096 | |
1097 ahcf->peers->peer[0].uri_separator = ":"; | |
1098 | 1095 |
1099 ahcf->host_header.len = sizeof("localhost") - 1; | 1096 ahcf->host_header.len = sizeof("localhost") - 1; |
1100 ahcf->host_header.data = (u_char *) "localhost"; | 1097 ahcf->host_header.data = (u_char *) "localhost"; |
1101 ahcf->uri = unix_upstream.uri; | 1098 ahcf->uri = unix_upstream.uri; |
1102 | 1099 |
1119 ahcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); | 1116 ahcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); |
1120 if (ahcf->peers == NULL) { | 1117 if (ahcf->peers == NULL) { |
1121 return NGX_CONF_ERROR; | 1118 return NGX_CONF_ERROR; |
1122 } | 1119 } |
1123 | 1120 |
1124 for (i = 0; i < ahcf->peers->number; i++) { | |
1125 ahcf->peers->peer[i].uri_separator = ""; | |
1126 } | |
1127 | |
1128 ahcf->host_header = inet_upstream.host_header; | 1121 ahcf->host_header = inet_upstream.host_header; |
1129 ahcf->uri = inet_upstream.uri; | 1122 ahcf->uri = inet_upstream.uri; |
1130 } | 1123 } |
1131 | 1124 |
1125 if (ahcf->uri.len) { | |
1126 ahcf->uri.len = sizeof("/") - 1; | |
1127 ahcf->uri.data = (u_char *) "/"; | |
1128 } | |
1129 | |
1132 return NGX_CONF_OK; | 1130 return NGX_CONF_OK; |
1133 } | 1131 } |