Hi there:
        My name is Ruizhe Zhao, I'm Chinese, appologize to all for 
my poor English.

        Recently, I encounter a problem on my courier-imap server. There 
is a mail in my inbox, the mail content like this:

------=_Part_6_1535366669.1301091898663
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64

Ym9keeato+aWhw0K
------=_Part_6_1535366669.1301091898663
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div>body=E6=AD=A3=E6=96=87<br /> </div>
------=_Part_6_1535366669.1301091898663--


The text/plain part is coded by base64, it is a single line text(contains 
four us-ascii letters and two Chinese words coding in utf-8), and there is 
no '\r' or '\n' in the decoded content.

The text/html part is coded by qp, and there is no empty line after it.

When I search text 'body', imap server tell nothing found.

The following correction for code perhaps can resolve it.

imap/search.c

static int search_body_func(const char *ptr, size_t cnt, void *voidptr)
{
        ...
        for (i=0; i<cnt; i++)
         {
                ...
                /* check for end of buf */
                 if (c != '\n' && c != '\r' && i!=cnt-1)
                 {
                        ...
                }
                ...
        }
        ...
}


Is this right?

Any response is appreciated.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to