[Imap-protocol] ABNF Question regarding parsing of BODYSTRUCTURE FETCH responses

Xims <[email protected]>
Newsgroups gmane.mail.imap.general
Message-ID <[email protected]>
Dear all,

I seem to be missing a crucial information or some fundamental 
understanding. Probably the latter. :)

I have a standard BODYSTRUCTURE response in the following form (I 
removed the leading stuff):

((("text" "plain" ("charset" "UTF-8") NIL NIL "quoted-printable" 5143 
177 NIL NIL NIL NIL)("text" "html" ("charset" "UTF-8") NIL NIL 
"quoted-printable" 38975 930 NIL NIL NIL NIL) "alternative" ("boundary" 
"----=_NextPart_001_0080_01CEC0E1.57D56320") NIL NIL NIL)("image" "jpeg" 
("name" "image001.jpg") "<[email protected]>" NIL "base64" 
5634 NIL NIL NIL NIL) "related" ("boundary" 
"----=_NextPart_000_007F_01CEC0E1.57D56320") NIL ("de") NIL)


Now if I follow the ABNF, I get from msg-att-static to body. So far so 
good. But if I look at the body definition, it recursively calls body 
from body-type-mpart (because of the parentheses). But that rule states:

   body-type-mpart = 1*body SP media-subtype [SP body-ext-mpart]


which to me seems as after every body a SP and media-subtype etc should 
follow. So I parse the first body-type-1part correctly, but then my 
parser expects a space afterwards. Where did I go wrong when following 
the ABNF rules or what am I missing?


Thank you a lot in advance and best regards,
Florian

_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.