BODYSTRUCTURE BODY.PEEK[HEADER] fetch returning ze - WeOnlyDo Discussion board

BODYSTRUCTURE BODY.PEEK[HEADER] fetch returning ze (wodSmtpServer / wodPop3Server / wodImapServer)

by Eric Dahlvang, Tuesday, August 18, 2009, 20:30 (5363 days ago)

When the client issues a command such as:

[code]
UID FETCH 102 (BODYSTRUCTURE BODY.PEEK[HEADER])
[/code]

There are times that wodImapServer returns zero for the text and html text:
[code]
FETCH (UID 102 BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0) BODY[HEADER] {517}
[/code]

The filename is pointing to a valid .eml file that contains the body. And, I am unable to get consistent behavior. Do you have any idea why this would be happening?

Thank you.

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by wodDamir, Tuesday, August 18, 2009, 20:39 (5363 days ago) @ Eric Dahlvang

Hi Eric,

Can you please check which version of wodImapServer you have?

I believe we made some fixes related to this in previous updates, so if you don't have the latest one, could you please update and try it out?

Regards,
Damba

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by Eric Dahlvang, Tuesday, August 18, 2009, 20:49 (5363 days ago) @ wodDamir

version 2.2.2.104

It is strange because the behavior isn't consistent.

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by Eric Dahlvang, Tuesday, August 18, 2009, 22:42 (5363 days ago) @ Eric Dahlvang

Is that the latest version?

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by wodDamir, Tuesday, August 18, 2009, 23:04 (5363 days ago) @ Eric Dahlvang

Eric,

Yes, that's the latest version. Does this issue occur only for that message, or it doesn't matter?

Are you able to reproduce this issue with our samples?

Regards,
Damba

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by Eric Dahlvang, Thursday, August 20, 2009, 16:24 (5361 days ago) @ wodDamir

The following conversation is between the wodimap sample server and windows mobile 6. Windows mobile doesn't care if the size of the text and html is returned as zero for a fetch, it will still request the body later. However, other imap clients aren't so forgiving. Iphone 3G will not request the body if the BODYSTRUCTURE has zero for the size.

[code]
A2 NOOP
* OK [CAPABILITY IMAP4REV1] WeOnlyDo! COM Imap server version DEMO 2.2.2.104 ready.
A2 OK NOOP completed
A3 CAPABILITY
* CAPABILITY IMAP4REV1
A3 OK CAPABILITY completed
A4 LOGIN xxx@xxx.com xxxx
A4 OK LOGIN completed
A5 NAMESPACE
A5 BAD Command unrecognized
A6 LIST
* LIST () / INBOX
* LIST () / Sent Items
A6 OK LIST completed
A7 LIST Sent Items/ *
* LIST () /sent items Sent Items
A7 OK LIST completed
A8 LIST INBOX/ *
* LIST () /inbox INBOX
A8 OK LIST completed
A9 SELECT INBOX
* FLAGS (Seen Answered Deleted Flagged Draft Recent)
* 4 EXISTS
* 0 RECENT
* OK [UNSEEN 2] first unseen
* OK [UIDVALIDITY 1250632058] UIDs valid
* OK [PERMANENTFLAGS (Seen Answered Deleted Flagged Draft)]
A9 OK [READ-WRITE] SELECT completed
A10 FETCH 1:4 (UID FLAGS BODY.PEEK[HEADER.FIELDS (MESSAGE-ID)])
* 1 FETCH (UID 0 FLAGS (Seen) BODY[HEADER.FIELDS (MESSAGE-ID)] {100}
Message-ID: <555861965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 2 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {85}
Message-ID: <444.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 3 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {98}
Message-ID: <3331965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
* 4 FETCH (UID 0 FLAGS () BODY[HEADER.FIELDS (MESSAGE-ID)] {98}
Message-ID: <2221965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
)
A10 OK FETCH completed
A11 FETCH 1:4 (INTERNALDATE UID FLAGS RFC822.SIZE BODY.PEEK[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] BODYSTRUCTURE)
* 1 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS (Seen) RFC822.SIZE 145903 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {236}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <555861965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 2 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145888 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {221}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <444.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 3 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145901 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {234}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <3331965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUCTURE ( text html ( charset Windows-1252 ) NIL NIL quoted-printable 0 0))
* 4 FETCH (INTERNALDATE 18-Aug-2009 17:48:23 GMT UID 0 FLAGS () RFC822.SIZE 145901 BODY[HEADER.FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPORTANCE PRIORITY X-PRIORITY)] {234}
Date: Tue, 18 Aug 2009 17:48:23 GMT
From: xxx@xxx.com;
Subject: huge 6
Message-ID: <2221965031398750.ce9a193d-0619-4f46-a9ea-9133e2a438b4.xxx@xxx.com>
Content-type: text/html; charset=Windows-1252
BODYSTRUC

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by wodDamir, Thursday, August 20, 2009, 16:48 (5361 days ago) @ Eric Dahlvang

Eric,

Is there any chance you could send me one such message that you receive this issue with?

If so, you can send it to techsupport@weonlydo.com

I'd like to duplicate the same behaviour on my side.

If we are able to reproduce this on our side, we can then easily resolve the problem.

Regards,
Damba

Re: BODYSTRUCTURE BODY.PEEK[HEADER] fetch returnin

by Eric Dahlvang, Thursday, August 20, 2009, 17:38 (5361 days ago) @ wodDamir

I've emailed the .eml files I used with your sample application.

Thank you for being so responsive.