mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Xims <xims@xylon.de>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:52 -0000
Message-ID: b0ab0850338d4c523024e7c6cd274a50@xylon.de permalink / raw / eml / mbox
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") "<image001.jpg@01CE182E.2F3DBAE0>" 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
Reply
E-mail headers
From: arnt@gulbrandsen.priv.no
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:52 -0000
Message-ID: 5ceef93d-2727-462b-8ddb-fc02344c6a72@gulbrandsen.priv.no permalink / raw / eml / mbox
On Wednesday, January 29, 2014 2:57:41 PM CEST, xims@xylon.de wrote:
> 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?

1*body means "one or more instances of body". The SP media-subtype matches 
things like ' "alternative"' and ' "related"' in your example.

Arnt
Reply
E-mail headers
From: xims@xylon.de
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:52 -0000
Message-ID: 130e5b3a1f74f4ff0950ffba5694e5f4@xylon.de permalink / raw / eml / mbox
Hi Arnt,

> 1*body means "one or more instances of body". The SP media-subtype
> matches things like ' "alternative"' and ' "related"' in your 
> example.

Thanks a lot - that was easy, now it works like a charm. :)


Best regards,
Florian
Reply