abhishek-ram / pyas2-lib

AS2 Library for building and parsing Messages and MDNs
GNU General Public License v3.0
43 stars 28 forks source link

MDN Parse failes when Original-Recipient / Final-Recipient do not provide address-type (SEEBURGER) #33

Closed chadgates closed 2 years ago

chadgates commented 3 years ago

Seems that SEEBURGER is not provider address-type in their message-header but only the partner id:

Content-Type: message/disposition-notification
Content-Transfer-Encoding: binary

Reporting-UA: 172.26.1.71; SEEBURGER AS2 Communication
Original-Recipient: PARTNERID
Final-Recipient: PARTNERID
Original-Message-ID: ....

instead of :

Original-Recipient: rfc822;PARTNERID
Final-Recipient: rfc822;PARTNERID

Error_: Failed to parse AS2 MDN : Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/pyas2lib/as2.py", line 878, in parse self.orig_message_id, orig_recipient = self.detect_mdn() File "/usr/local/lib/python3.7/site-packages/pyas2lib/as2.py", line 988, in detect_mdn message_recipient = mdn["Original-Recipient"].split(";")[1].strip() IndexError: list index out of range

chadgates commented 2 years ago

Merged with PR @34