]> git.kaiwu.me - nginx.git/commit
Mail: optimized discarding invalid SMTP commands.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 19 May 2021 00:13:17 +0000 (03:13 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 19 May 2021 00:13:17 +0000 (03:13 +0300)
commit317223cb56f70f3fc2eb646a78a8f0161cafa70b
treeeb5a1441ea1322737ff762d81b9193b13e242ea9
parent204f944add09c43223de317451175d5fdb7d1fb0
Mail: optimized discarding invalid SMTP commands.

There is no need to scan buffer from s->buffer->pos, as we already scanned
the buffer till "p" and wasn't able to find an LF.

There is no real need for this change in SMTP, since it is at most a
microoptimization of a non-common code path.  Similar code in IMAP, however,
will have to start scanning from "p" to be correct, since there can be
newlines in IMAP literals.
src/mail/ngx_mail_parse.c