cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] POP3: fixed escaped dot not being striped out

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Wed, 30 Nov 2011 18:39:22 +0000

Dear all,

Please find attached a patch that corrects escaped full stop characters
(dots) at the beginning of new lines.

The patch is based around Daniel's reworking of the eob detection, however,
rather than allocate new buffers and memcpy the content around I have
extended the detection to be whole buffer based rather than just the last 5
characters. This will slow incoming mail down but I can't think what else we
can do.

Also note that the eob member variable of the pop3c struct is still used to
count the detected characeters - I didn't see any need to rename this
variable even though it's being used for two purposes now - having a
variable called eob_or_crlfdot seemed a bit daft ;-)

Again, I have tested this against my Exchange Server and it parses all the
problem emails where eob was split across multiple packets correctly. I have
also tested it against empty LIST commands to make sure I haven't broken the
recent fix Daniel wrote for that.

Any comments and or suggestions always welcome.

Kind Regards

Steve

Received on 2011-11-30