Mercurial > hg > nginx
diff src/imap/ngx_imap_parse.c @ 583:4e296b7d25bf release-0.3.13
nginx-0.3.13-RELEASE import
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; the bug had appeared in 0.3.11.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 13:18:09 +0000 |
parents | 4d9ea73a627a |
children | 887d8dec72dc |
line wrap: on
line diff
--- a/src/imap/ngx_imap_parse.c +++ b/src/imap/ngx_imap_parse.c @@ -119,6 +119,25 @@ ngx_int_t ngx_imap_parse_command(ngx_ima } break; +#if (NGX_IMAP_SSL) + case 8: + if ((c[0] == 'S'|| c[0] == 's') + && (c[1] == 'T'|| c[1] == 't') + && (c[2] == 'A'|| c[2] == 'a') + && (c[3] == 'R'|| c[3] == 'r') + && (c[4] == 'T'|| c[4] == 't') + && (c[5] == 'T'|| c[5] == 't') + && (c[6] == 'L'|| c[6] == 'l') + && (c[7] == 'S'|| c[7] == 's')) + { + s->command = NGX_IMAP_STARTTLS; + + } else { + goto invalid; + } + break; +#endif + case 10: if ((c[0] == 'C'|| c[0] == 'c') && (c[1] == 'A'|| c[1] == 'a') @@ -421,7 +440,11 @@ ngx_int_t ngx_pop3_parse_command(ngx_ima } else if (c0 == 'N' && c1 == 'O' && c2 == 'O' && c3 == 'P') { s->command = NGX_POP3_NOOP; - +#if (NGX_IMAP_SSL) + } else if (c0 == 'S' && c1 == 'T' && c2 == 'L' && c3 == 'S') + { + s->command = NGX_POP3_STLS; +#endif } else { goto invalid; }