Mercurial > hg > nginx-vendor-0-5
comparison src/imap/ngx_imap_core_module.c @ 250:fbf2b2f66c9f NGINX_0_4_10
nginx 0.4.10
*) Feature: the POP3 proxy supports the APOP command.
*) Bugfix: if the select, poll or /dev/poll methods were used, then
while waiting authentication server response the IMAP/POP3 proxy
hogged CPU.
*) Bugfix: a segmentation fault might occur if the $server_addr
variable was used in the "map" directive.
*) Bugfix: the ngx_http_flv_module did not support the byte ranges for
full responses; bug appeared in 0.4.7.
*) Bugfix: nginx could not be built on Debian amd64; bug appeared in
0.4.9.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Oct 2006 00:00:00 +0400 |
parents | 56688ed172c8 |
children | 644510700914 |
comparison
equal
deleted
inserted
replaced
249:7a34085272cb | 250:fbf2b2f66c9f |
---|---|
43 ngx_string("UIDPLUS"), | 43 ngx_string("UIDPLUS"), |
44 ngx_null_string | 44 ngx_null_string |
45 }; | 45 }; |
46 | 46 |
47 | 47 |
48 static ngx_conf_bitmask_t ngx_imap_auth_methods[] = { | |
49 { ngx_string("plain"), NGX_IMAP_AUTH_PLAIN_ENABLED }, | |
50 { ngx_string("apop"), NGX_IMAP_AUTH_APOP_ENABLED }, | |
51 { ngx_null_string, 0 } | |
52 }; | |
53 | |
54 | |
48 static ngx_command_t ngx_imap_core_commands[] = { | 55 static ngx_command_t ngx_imap_core_commands[] = { |
49 | 56 |
50 { ngx_string("server"), | 57 { ngx_string("server"), |
51 NGX_IMAP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, | 58 NGX_IMAP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, |
52 ngx_imap_core_server, | 59 ngx_imap_core_server, |
100 NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_1MORE, | 107 NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_1MORE, |
101 ngx_imap_core_capability, | 108 ngx_imap_core_capability, |
102 NGX_IMAP_SRV_CONF_OFFSET, | 109 NGX_IMAP_SRV_CONF_OFFSET, |
103 offsetof(ngx_imap_core_srv_conf_t, imap_capabilities), | 110 offsetof(ngx_imap_core_srv_conf_t, imap_capabilities), |
104 NULL }, | 111 NULL }, |
112 | |
113 { ngx_string("server_name"), | |
114 NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_TAKE1, | |
115 ngx_conf_set_str_slot, | |
116 NGX_IMAP_SRV_CONF_OFFSET, | |
117 offsetof(ngx_imap_core_srv_conf_t, server_name), | |
118 NULL }, | |
119 | |
120 { ngx_string("auth"), | |
121 NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_1MORE, | |
122 ngx_conf_set_bitmask_slot, | |
123 NGX_IMAP_SRV_CONF_OFFSET, | |
124 offsetof(ngx_imap_core_srv_conf_t, auth_methods), | |
125 &ngx_imap_auth_methods }, | |
105 | 126 |
106 ngx_null_command | 127 ngx_null_command |
107 }; | 128 }; |
108 | 129 |
109 | 130 |
208 ngx_conf_merge_uint_value(conf->protocol, prev->protocol, | 229 ngx_conf_merge_uint_value(conf->protocol, prev->protocol, |
209 NGX_IMAP_IMAP_PROTOCOL); | 230 NGX_IMAP_IMAP_PROTOCOL); |
210 ngx_conf_merge_value(conf->so_keepalive, prev->so_keepalive, 0); | 231 ngx_conf_merge_value(conf->so_keepalive, prev->so_keepalive, 0); |
211 | 232 |
212 | 233 |
234 ngx_conf_merge_bitmask_value(conf->auth_methods, prev->auth_methods, | |
235 (NGX_CONF_BITMASK_SET|NGX_IMAP_AUTH_PLAIN_ENABLED)); | |
236 | |
237 | |
238 ngx_conf_merge_str_value(conf->server_name, prev->server_name, ""); | |
239 | |
240 if (conf->server_name.len == 0) { | |
241 conf->server_name.data = ngx_palloc(cf->pool, NGX_MAXHOSTNAMELEN); | |
242 if (conf->server_name.data == NULL) { | |
243 return NGX_CONF_ERROR; | |
244 } | |
245 | |
246 if (gethostname((char *) conf->server_name.data, NGX_MAXHOSTNAMELEN) | |
247 == -1) | |
248 { | |
249 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | |
250 "gethostname() failed"); | |
251 return NGX_CONF_ERROR; | |
252 } | |
253 | |
254 conf->server_name.len = ngx_strlen(conf->server_name.data); | |
255 } | |
256 | |
257 | |
213 if (conf->pop3_capabilities.nelts == 0) { | 258 if (conf->pop3_capabilities.nelts == 0) { |
214 conf->pop3_capabilities = prev->pop3_capabilities; | 259 conf->pop3_capabilities = prev->pop3_capabilities; |
215 } | 260 } |
216 | 261 |
217 if (conf->pop3_capabilities.nelts == 0) { | 262 if (conf->pop3_capabilities.nelts == 0) { |