Mercurial > hg > nginx-mail
comparison src/mail/ngx_mail_proxy_module.c @ 473:ce4f9ff90bfa NGINX_0_7_31
nginx 0.7.31
*) Change: now the "try_files" directive tests files only and ignores
directories.
*) Feature: the "fastcgi_split_path_info" directive.
*) Bugfixes in an "Expect" request header line support.
*) Bugfixes in geo ranges.
*) Bugfix: in a miss case ngx_http_memcached_module returned the "END"
line as response body instead of default 404 page body; the bug had
appeared in 0.7.18.
Thanks to Maxim Dounin.
*) Bugfix: while SMTP proxying nginx issued message "250 2.0.0 OK"
instead of "235 2.0.0 OK"; the bug had appeared in 0.7.22.
Thanks to Maxim Dounin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 19 Jan 2009 00:00:00 +0300 |
parents | dac47e9ef0d5 |
children | 96428109ec3b 33394d1255b0 |
comparison
equal
deleted
inserted
replaced
466:5da91f7cde93 | 473:ce4f9ff90bfa |
---|---|
102 NULL, /* exit master */ | 102 NULL, /* exit master */ |
103 NGX_MODULE_V1_PADDING | 103 NGX_MODULE_V1_PADDING |
104 }; | 104 }; |
105 | 105 |
106 | 106 |
107 static u_char smtp_ok[] = "250 2.0.0 OK" CRLF; | 107 static u_char smtp_auth_ok[] = "235 2.0.0 OK" CRLF; |
108 | 108 |
109 | 109 |
110 void | 110 void |
111 ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_peer_addr_t *peer) | 111 ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_peer_addr_t *peer) |
112 { | 112 { |
612 | 612 |
613 if (s->auth_method == NGX_MAIL_AUTH_NONE) { | 613 if (s->auth_method == NGX_MAIL_AUTH_NONE) { |
614 b->pos = b->start; | 614 b->pos = b->start; |
615 | 615 |
616 } else { | 616 } else { |
617 ngx_memcpy(b->start, smtp_ok, sizeof(smtp_ok) - 1); | 617 ngx_memcpy(b->start, smtp_auth_ok, sizeof(smtp_auth_ok) - 1); |
618 b->last = b->start + sizeof(smtp_ok) - 1; | 618 b->last = b->start + sizeof(smtp_auth_ok) - 1; |
619 } | 619 } |
620 | 620 |
621 s->connection->read->handler = ngx_mail_proxy_handler; | 621 s->connection->read->handler = ngx_mail_proxy_handler; |
622 s->connection->write->handler = ngx_mail_proxy_handler; | 622 s->connection->write->handler = ngx_mail_proxy_handler; |
623 rev->handler = ngx_mail_proxy_handler; | 623 rev->handler = ngx_mail_proxy_handler; |