EldoS | Feel safer!

Software components for data protection, secure storage and transfer

AS2 MDN response header issue

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
Posted: 02/12/2013 02:59:56
by AdValvas Europe (Premium support level)
Joined: 12/18/2012
Posts: 14

We have a small problem with the mdn message send back to a customer.

The following header seems to be generated by SBB AS2 component, when a synchronous mdn message was requested:

Disposition: automatic-action/mdn-sent-automatically;

In reality, before the word "processed" there is a tab character. And there is this carriage return character too, after "mdn-sent-automatically;"

Our customer has problems with this in their production environment, where some SAP library attempts to receive the MDN. They cannot adapt their system and they say we are not following the standard syntax for AS2 at this point. But apparently we have no control over this specific header line, it seems to be generated by SBB.

Can you please check this? Could it be some small error in your code somewhere?

Thanks a lot for a quick response.
Posted: 02/12/2013 04:55:01
by Alexander Ionov (EldoS Corp.)

Thank you for your report. Do they refer a particular section of RFC, as they say, we do not following?
Because the field value you mentioned is built according to the rule of splitting a long field value into two and more lines. This rule is called "folding" and it's described in section 2.2.3 of RFC 5322 (E-mail messages format) which is used as a basic standard for formatting all AS2 messages including MDNs, and in section 4.2 of RFC 2616 (HTTP v1.1) which is used as a transport protocol in AS2. Such lines must be unfolded before parsing their values.
Also please take a look at section 7.5.3 of RFC 4130. This section contains a folded example of failure notification as the following:
Disposition: "disposition-mode"; failed/Failure:
  unsupported format

It uses a space character for folding but using a tab character is also allowed by the RFC I mentioned above.

Best regards,
Alexander Ionov
Posted: 02/12/2013 06:19:27
by AdValvas Europe (Premium support level)
Joined: 12/18/2012
Posts: 14

Thank you. We think this is correct information. So we have asked our customer to improve their parsing process for MDN messages.

As a recommendation I would still suggest to implement a possibility on your end to switch off folding, just to cover the problem that may occur with older or incomplete parsing engines used by other parties. Just my idea.

Kind regards and thank you for the quick response.
Posted: 05/22/2014 04:45:44
by Ronald van Kuijk (Basic support level)
Joined: 05/22/2014
Posts: 5

One of our customers has problems with this to. And while the AS2 RFC has an example with header folding, the HTTP/SMTP RFC's allow it, it is in fact 'due to consensus' (read: most likely a bug in earlier M$ software) NOT allowed to do header folding

This can be read in the interoperability (cummulative) test reports http://www.drummondgroup.com/pdfs/AS2-3Q13_Issues_Resolved.pdf

In 2011:
Participant was sending folded headers however due to prior Consensus Item, folded
headers are not allowed in AS2 Interop’s. Participant was using BouncyCastle which
folded headers so headers were unfolded prior to sending.

And earlier in 2008:
One participant was sending folded headers in MDN’s. Based on earlier consensus
items, folded headers are not allowed because some Microsoft IIS does not process
folded headers.

2 Questions:
- Will it be fixed by you guys (if so 'when'?)
- Is there a way to 'manipulate' the MDN before it is actually sent out?


Ronald van Kuijk
Posted: 05/22/2014 05:37:28
by Ronald van Kuijk (Basic support level)
Joined: 05/22/2014
Posts: 5

Hmmmm... Checking the releasenotes, I noticed a 'fix' already seems to be provided... Folding was prevented in May 2013 and made configurable in August 2013. Unfortunately this did not came up when searching this site. Will contact the customer to check which version they are running.
Posted: 05/22/2014 06:09:34
by Ronald van Kuijk (Basic support level)
Joined: 05/22/2014
Posts: 5

The documentation of the 11.0 release does not mention the UseFolding property anywhere other than in the releasenotes.

In the .Net version, the UseFolding is available, but not in the java version... Any hints?
Posted: 05/22/2014 10:23:56
by Ronald van Kuijk (Basic support level)
Joined: 05/22/2014
Posts: 5

Confirmed that using the UseFolding set to false solves the problem.

And for the java version, very many methods in the TElAS2* classes are protected so you cannot do anything with them. Subclassing them and overriding the methods makes them available. Will create a new topic for this.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages



Topic viewed 1553 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!