Mercurial > hg > nginx-vendor-0-8
diff src/mail/ngx_mail_pop3_handler.c @ 570:8246d8a2c2be NGINX_0_8_37
nginx 0.8.37
*) Feature: the ngx_http_split_clients_module.
*) Feature: the "map" directive supports keys more than 255 characters.
*) Bugfix: nginx ignored the "private" and "no-store" values in the
"Cache-Control" backend response header line.
*) Bugfix: a "stub" parameter of an "include" SSI directive was not
used, if empty response has 200 status code.
*) Bugfix: if a proxied or FastCGI request was internally redirected to
another proxied or FastCGI location, then a segmentation fault might
occur in a worker process; the bug had appeared in 0.8.33.
Thanks to Yichun Zhang.
*) Bugfix: IMAP connections may hang until they timed out while talking
to Zimbra server.
Thanks to Alan Batie.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 17 May 2010 00:00:00 +0400 |
parents | da3c99095432 |
children |
line wrap: on
line diff
--- a/src/mail/ngx_mail_pop3_handler.c +++ b/src/mail/ngx_mail_pop3_handler.c @@ -59,8 +59,7 @@ ngx_mail_pop3_init_session(ngx_mail_sess s->out.len = p - s->out.data; } else { - s->out.len = sizeof(pop3_greeting) - 1; - s->out.data = pop3_greeting; + ngx_str_set(&s->out, pop3_greeting); } c->read->handler = ngx_mail_pop3_init_protocol; @@ -149,8 +148,7 @@ ngx_mail_pop3_auth_state(ngx_event_t *re return; } - s->out.len = sizeof(pop3_ok) - 1; - s->out.data = pop3_ok; + ngx_str_set(&s->out, pop3_ok); if (rc == NGX_OK) { switch (s->mail_state) { @@ -226,8 +224,7 @@ ngx_mail_pop3_auth_state(ngx_event_t *re case ngx_pop3_auth_login_username: rc = ngx_mail_auth_login_username(s, c, 0); - s->out.len = sizeof(pop3_password) - 1; - s->out.data = pop3_password; + ngx_str_set(&s->out, pop3_password); s->mail_state = ngx_pop3_auth_login_password; break; @@ -259,8 +256,7 @@ ngx_mail_pop3_auth_state(ngx_event_t *re s->mail_state = ngx_pop3_start; s->state = 0; - s->out.len = sizeof(pop3_invalid_command) - 1; - s->out.data = pop3_invalid_command; + ngx_str_set(&s->out, pop3_invalid_command); /* fall through */ @@ -466,24 +462,21 @@ ngx_mail_pop3_auth(ngx_mail_session_t *s case NGX_MAIL_AUTH_LOGIN: - s->out.len = sizeof(pop3_username) - 1; - s->out.data = pop3_username; + ngx_str_set(&s->out, pop3_username); s->mail_state = ngx_pop3_auth_login_username; return NGX_OK; case NGX_MAIL_AUTH_LOGIN_USERNAME: - s->out.len = sizeof(pop3_password) - 1; - s->out.data = pop3_password; + ngx_str_set(&s->out, pop3_password); s->mail_state = ngx_pop3_auth_login_password; return ngx_mail_auth_login_username(s, c, 1); case NGX_MAIL_AUTH_PLAIN: - s->out.len = sizeof(pop3_next) - 1; - s->out.data = pop3_next; + ngx_str_set(&s->out, pop3_next); s->mail_state = ngx_pop3_auth_plain; return NGX_OK;