diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2021-05-19 03:13:28 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2021-05-19 03:13:28 +0300 |
commit | 5015209054f68141cd4f5f61e874d4497d4ef49c (patch) | |
tree | 7e3caab12367ee7d3be8b2f33b5bb1c0ecec9c95 /src/mail/ngx_mail_proxy_module.c | |
parent | 4617dd64b863df111e33b1b395709f4c2f427350 (diff) | |
download | nginx-5015209054f68141cd4f5f61e874d4497d4ef49c.tar.gz nginx-5015209054f68141cd4f5f61e874d4497d4ef49c.zip |
Mail: IMAP pipelining support.
The change is mostly the same as the SMTP one (04e43d03e153 and 3f5d0af4e40a),
and ensures that nginx is able to properly handle or reject multiple IMAP
commands. The s->cmd field is not really used and set for consistency.
Non-synchronizing literals handling in invalid/unknown commands is limited,
so when a non-synchronizing literal is detected at the end of a discarded
line, the connection is closed.
Diffstat (limited to 'src/mail/ngx_mail_proxy_module.c')
-rw-r--r-- | src/mail/ngx_mail_proxy_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c index 0f56d299e..a7ab0776e 100644 --- a/src/mail/ngx_mail_proxy_module.c +++ b/src/mail/ngx_mail_proxy_module.c @@ -486,6 +486,10 @@ ngx_mail_proxy_imap_handler(ngx_event_t *rev) c->log->action = NULL; ngx_log_error(NGX_LOG_INFO, c->log, 0, "client logged in"); + if (s->buffer->pos < s->buffer->last) { + ngx_post_event(c->write, &ngx_posted_events); + } + ngx_mail_proxy_handler(s->connection->write); return; |