Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

"Unable to get multipart/signed data content; Caused by: Missing start boundary" Sync MDN #22

Closed
choonming opened this issue May 29, 2018 · 18 comments
Assignees
Labels

Comments

@choonming
Copy link

choonming commented May 29, 2018

I'm using the master branch for the as2-server deployment with sync MDN with a partner which uses axway activator. They are sending a message to us to be processed. We are getting a failed status from their end with the following message:

Failure: Description(The system was unable to process the message due to some unexpected error: Unable to get root content of MIME message; Caused by: Unable to get multipart/signed data content; Caused by: Missing start boundary ) 

I received the message successfully and able to de-crypt the payload.

[2018-05-29T09:17:17,403] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] AS2ConnectionThread: run -- com.helger.as2lib.processor.receiver.AbstractActiveNetModule$ConnectionThread.run(AbstractActiveNetModule.java:233)
[2018-05-29T09:17:17,403] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] Incoming connection 127.0.0.1:54636 -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.handle(AS2ReceiverHandler.java:548)
[2018-05-29T09:17:17,403] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] received 3221 bytes in 0.0 seconds at 3.149 KBps from 127.0.0.1:54636 [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.handle(AS2ReceiverHandler.java:572)
[2018-05-29T09:17:17,419] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] Successfully decrypted incoming AS2 message [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.decrypt(AS2ReceiverHandler.java:157)
[2018-05-29T09:17:17,426] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] Successfully verified signature of incoming AS2 message [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.verify(AS2ReceiverHandler.java:214)
[2018-05-29T09:17:17,427] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] stored message to /opt/openas2/data/inbox/5400107000005-MaxedaDIYACC01-_1527585436797.1302674@iEMSj4l3_ [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.storage.MessageFileModule.handle(MessageFileModule.java:87)
[2018-05-29T09:17:17,429] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] stored headers to /opt/openas2/data/inbox/msgheaders/2018/05/5400107000005-MaxedaDIYACC01-_1527585436797.1302674@iEMSj4l3_ [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.storage.MessageFileModule.handle(MessageFileModule.java:105)
[2018-05-29T09:17:17,441] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] Sending back sync MDN [automatic-action/MDN-sent-automatically; processed] 127.0.0.1:54636 [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.sendSyncMDN(AS2ReceiverHandler.java:294)
[2018-05-29T09:17:17,453] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] stored MDN to /opt/openas2/data/mdn/2018/05/5400107000005-MaxedaDIYACC01-_1527585436797.1302674@iEMSj4l3_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2018-05-29T09:17:17,453] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] sent MDN [automatic-action/MDN-sent-automatically; processed] 127.0.0.1:54636 [<1527585436797.1302674@iEMSj4l3>] -- com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler.sendSyncMDN(AS2ReceiverHandler.java:322)
[2018-05-29T09:17:17,453] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] AS2ConnectionThread: done running -- com.helger.as2lib.processor.receiver.AbstractActiveNetModule$ConnectionThread.run(AbstractActiveNetModule.java:247)
[2018-05-29T09:17:18,343] [AS2-SERVER] [INFO ] [AS2ConnectionThread-AS2ReceiverModule] AS2ConnectionThread: run -- com.helger.as2lib.processor.receiver.AbstractActiveNetModule$ConnectionThread.run(AbstractActiveNetModule.java:233)
@phax phax self-assigned this May 29, 2018
@phax phax added the question label May 29, 2018
@phax
Copy link
Owner

phax commented May 29, 2018

Can you please paste the stored message, headers and MDN here. Thanks

@choonming
Copy link
Author

message header:

Headers:
host: receiver.example.com
connection: close
content-length: 3221
x-forwarded-for: 1.1.1.1
x-forwarded-proto: http
x-forwarded-port: 80
x-amzn-trace-id: Root=1-5b0d1959-59c64911c7c2e94e3cb08e50
date: Tue, 29 May 2018 09:11:53 GMT
from: [email protected]
message-id: <1527585113442.1302249@iEMSj4l3>
mime-version: 1.0
content-type: application/octet-stream; name=TestFile.txt
content-transfer-encoding: binary
content-disposition: attachment; filename=TestFile.txt
disposition-notification-to: [email protected]
disposition-notification-options: signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1
ediint-features: CEM, multiple-attachments, AS2-Reliability
as2-version: 1.2
as2-to: receiverID
as2-from: senderID
user-agent: haboob/5.12.0.0.3 build-48355

Attributes:
source_ip: 127.0.0.1
source_port: 54186
destination_ip: 127.0.0.1
destination_port: 10080
as2msg.received: true
HTTP_REQUEST_TYPE: POST
HTTP_REQUEST_URL: /
HTTP_REQUEST_VERSION: HTTP/1.0
as2msg.received.encrypted: true
as2msg.received.signed: true

payload:

TestDataroot

mdn:

Headers:
as2-to: senderID
as2-from: receiverID
as2-version: 1.1
date: Tue, 29 May 2018 09:11:54 +0000
server: ph-OpenAS2 4.0.2
mime-version: 1.0
from: [email protected]
subject: Your Requested MDN Response
content-type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 
	boundary="----=_Part_2_673195815.1527585114273"
message-id: <ph-OpenAS2-29052018091154+0000-6112@receiverID_senderID>
content-length: 4107

Attributes:
REPORTING_UA: ph-OpenAS2 [email protected]:10080
ORIGINAL_RECIPIENT: rfc822; receiverID
FINAL_RECIPIENT: rfc822; senderID
ORIGINAL_MESSAGE_ID: <1527585113442.1302249@iEMSj4l3>
DISPOSITION: automatic-action/MDN-sent-automatically; processed
MIC: JasXmlanI3Y6VaGoFzit4U1dQKI=, sha1
Text:
The message sent to Recipient receiverID on Tue, 29 May 2018 09:11:53 GMT with Subject null has been received, the EDI Interchange was successfully decrypted and it's integrity was verified. In addition, the sender of the message, Sender senderID at Location 127.0.0.1 was authenticated as the originator of the message. There is no guarantee however that the EDI Interchange was syntactically correct, or was received by the EDI application/translator.

I do noticed that I have multiple parts of the message in the inbox and mdn folders

root@36012dd23ca1:/opt/openas2/data/inbox# ls
senderID-receiverID-_1527585113442.1302249@iEMSj4l3_
senderID-receiverID-_1527585113442.1302249@iEMSj4l3_.0
senderID-receiverID-_1527585113442.1302249@iEMSj4l3_.1  

@choonming
Copy link
Author

adding config.xml just in case

<?xml version="1.0" encoding="utf-8"?>

<!-- Remove the underscores to enable this attributes. Default values are "true" -->
<openas2 _CryptoVerifyUseCertificateInBodyPart="false"
         _CryptoSignIncludeCertificateInBodyPart="false">
  <certificates classname="com.helger.as2.app.cert.ServerCertificateFactory"
                type="pkcs12"
                filename="%home%/certs.p12"
                password="test"
                interval="300"/>
  <partnerships classname="com.helger.as2.app.partner.ServerXMLPartnershipFactory"
                filename="%home%/partnerships.xml"/>

  <commands classname="com.helger.as2.cmd.XMLCommandRegistry"
             filename="%home%/commands.xml"/>
  <commandProcessors>
    <commandProcessor classname="com.helger.as2.cmdprocessor.StreamCommandProcessor"/>
  </commandProcessors>

  <processor classname="com.helger.as2lib.processor.DefaultMessageProcessor"
             pendingMDN="data/pendingMDN3"
             pendingMDNinfo="data/pendinginfoMDN3">
    <module classname="com.helger.as2lib.processor.sender.AS2SenderModule" />

    <module classname="com.helger.as2lib.processor.receiver.AS2DirectoryPollingModule"
            outboxdir="data/toAny"
            errordir="data/toAny/error"
            interval="5"
            delimiters="-."
            format="sender.as2_id, receiver.as2_id, attributes.fileid"
            mimetype="application/EDI-X12"/>
    <module classname="com.helger.as2lib.processor.receiver.AS2DirectoryPollingModule"
            outboxdir="data/receiverID/"
            errordir="data/receiverID/error"
            interval="5"
            defaults="sender.as2_id=senderID, receiver.as2_id=senderID"
            mimetype="application/EDI-X12"/>
    <module classname="com.helger.as2lib.processor.receiver.AS2DirectoryPollingModule"
            outboxdir="data/toRiversand"
            errordir="data/toRiversand/error"
            interval="5"
            defaults="sender.as2_id=recieverID, receiver.as2_id=senderID"
            sendFilename="true"
            mimetype="application/EDI-X12"/>
    <module classname="com.helger.as2lib.processor.storage.MDNFileModule"
            filename="data/mdn/$date.uuuu$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$"
            protocol="as2"
            tempdir="data/temp"/>
    <module classname="com.helger.as2lib.processor.storage.MessageFileModule"
            filename="data/inbox/$msg.sender.as2_id$-$msg.receiver.as2_id$-$msg.headers.message-id$"
            header="data/inbox/msgheaders/$date.uuuu$/$date.MM$/$msg.sender.as2_id$-$msg.receiver.as2_id$-$msg.headers.message-id$"  
            protocol="as2"
            tempdir="data/temp"/>
    <module classname="com.helger.as2lib.processor.receiver.AS2ReceiverModule"
            port="10080"
            errordir="data/inbox/error"
            errorformat="$msg.sender.as2_id$, $msg.receiver.as2_id$, $msg.headers.message-id$"/>
    <module classname="com.helger.as2lib.processor.resender.DirectoryResenderModule"
            resenddir="data/resend"
            errordir="data/resend/error"
            resenddelay="60"/>
  </processor>
</openas2>

@phax
Copy link
Owner

phax commented May 29, 2018

Okay, I have no clue. I'm pretty sure, that the system transmits the messages correctly and the problem is at the receiving side.
Currently there is only a possibility to dump incoming HTTP traffic in the directory specified by the system property AS2.httpDumpDirectory (see https://github.com/phax/as2-lib#system-properties) but no system property to dump the outgoing stream "as is". Can you easily switch to a SNAPSHOT version for testing? I could add that in the current HEAD version so that we can investigate what the issue is.

phax added a commit to phax/as2-lib that referenced this issue May 29, 2018
@choonming
Copy link
Author

Yes I could do that easily. Testing with incoming message from the Axway activator is tricky as we need to relay that to our partner. Could this be a misconfiguration where it is async instead of synchronous setup? Why is openas2 trying to upload a multipart file for something simple?

@phax
Copy link
Owner

phax commented May 30, 2018

The phrase Caused by: Missing start boundary indicates, that they have problem parsing the S/MIME message at all. An idea is, that they don't like the lower cases HTTP header names (content-type vs. Content-Type), so that they cannot find the start boundary indicator as in

content-type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 
	boundary="----=_Part_2_673195815.1527585114273"

@choonming
Copy link
Author

choonming commented May 30, 2018 via email

@phax
Copy link
Owner

phax commented May 30, 2018

Well, according to the HTTP specification, HTTP headers should be treated case-insensitive - maybe you can send a mail to Axway support and ask if that is a known issue???

@choonming
Copy link
Author

Not sure if I can get any quick response from Axway as I am not a customer. Would it be possible to create a separate branch with the proper case for the headers? I checked with the source code for the full stack and all headers are like "Content-Type" etc. It'll be quicker to test it this way.

@choonming
Copy link
Author

additional information when i test using the full openas2 stack

msgheader:

Headers:
Content-Type: application/octet-stream; name=TestFile.txt
Host: receiver.example.com
Connection: close
Content-Length: 3221
X-Forwarded-For: 1.1.1.1
X-Forwarded-Proto: http
X-Forwarded-Port: 80
X-Amzn-Trace-Id: Root=1-5b0fa4e8-12036026d0cb5ee89b1f467e
Date: Thu, 31 May 2018 07:31:52 GMT
From: [email protected]
Message-Id: <1527751912193.1375948@iEMSj4l3>
MIME-Version: 1.0
Content-Transfer-Encoding: binary
Content-Disposition: attachment; filename=TestFile.txt
Disposition-Notification-To: [email protected]
Disposition-Notification-Options: signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1
EDIINT-Features: CEM, multiple-attachments, AS2-Reliability
AS2-Version: 1.2
AS2-To: receiver
AS2-From: sender
User-Agent: haboob/5.12.0.0.3 build-48355

Attributes:
HTTP_REQUEST_TYPE: POST
destination_ip: /127.0.0.1
HTTP_REQUEST_URL: /
source_ip: /127.0.0.1
destination_port: 10080
source_port: 49454

mdn header:

Headers:
Date: Thu, 31 May 2018 07:31:53 +0000
From: [email protected]
Message-ID: OPENAS2-31052018073154+0000-5e7e7b0e-c828-4226-875c-427e8848bfce@sender_receiver
Subject: Your Requested MDN Response
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 
	boundary="----=_Part_2_1200151116.1527751914425"
AS2-To: sender
AS2-From: receiver
AS2-Version: 1.1
Server: OpenAS2 Server v2.4.3
Content-Length: 2188

Attributes:
DISPOSITION: automatic-action/MDN-sent-automatically; processed
MIC: JasXmlanI3Y6VaGoFzit4U1dQKI=, sha1
ORIGINAL_MESSAGE_ID: <1527751912193.1375948@iEMSj4l3>
ORIGINAL_RECIPIENT: rfc822; receiver
REPORTING_UA: OpenAS2 Server v2.4.3@/127.0.0.1:10080
FINAL_RECIPIENT: rfc822; receiver
Text:
The message sent to Recipient receiver on Thu, 31 May 2018 07:31:52 GMT with Subject null has been received, the EDI Interchange was successfully decrypted and it's integrity was verified. In addition, the sender of the message, Sender sender at Location /127.0.0.1 was authenticated as the originator of the message. There is no guarantee however that the EDI Interchange was syntactically correct, or was received by the EDI application/translator.

payload:

root@f8c725cce3c4:/opt/openas2/data/sender-receiver# cat inbox/TestFile.txt-1527751912193.1375948\@iEMSj4l3 
TestData

@phax
Copy link
Owner

phax commented Jun 1, 2018

Sorry, public holiday yesterday. So it seem to work... I will try to create a version with case sensitive headers asap. Will keep you posted.

@phax
Copy link
Owner

phax commented Jun 5, 2018

Okay, I thought this through and checked the code:

  • Do I understand you correctly, that you get the error when sending a sync MDN back to Axway?
  • I checked the code and found no lowercasing on my side. So I assume they are sent this way.
  • Can you please switch to 4.0.3-SNAPSHOT version, specify a dump directory via the system property AS2.httpDumpDirectoryOutgoing (see https://github.com/phax/as2-lib#system-properties) and post the MDN content here?

@choonming
Copy link
Author

choonming commented Jun 6, 2018

  • From what I gather from Axway, that should be it.
  • noted
  • I pulled the latest code, build run and test locally but i do not see any outgoing file being dumped?

I ran this

git clone https://github.com/phax/as2-server.git openas2
cd openas2
mvn clean install -Pwithdep
java -DAS2.httpDumpDirectoryOutgoing=/tmp -cp "standalone/*" com.helger.as2.app.MainOpenAS2Server standalone/config/config.xml

The /tmp folder is empty even after i've sent some test data to another local openas2 instance

This is the log output

[2018-06-06T08:17:14,216] [AS2-SERVER] [INFO ] [main] Starting Active Modules... -- com.helger.as2.app.MainOpenAS2Server.start(MainOpenAS2Server.java:91)
[2018-06-06T08:17:14,238] [AS2-SERVER] [INFO ] [main] Inited AS2MainThread-AS2ReceiverModule at 0.0.0.0/0.0.0.0:10080 -- com.helger.as2lib.processor.receiver.AbstractActiveNetModule$MainThread.<init>(AbstractActiveNetModule.java:270)
[2018-06-06T08:17:14,244] [AS2-SERVER] [INFO ] [AS2MainThread-AS2ReceiverModule] AS2MainThread: run -- com.helger.as2lib.processor.receiver.AbstractActiveNetModule$MainThread.run(AbstractActiveNetModule.java:284)
[2018-06-06T08:17:14,245] [AS2-SERVER] [INFO ] [main] Loading Command Processor com.helger.as2.cmdprocessor.StreamCommandProcessor -- com.helger.as2.app.MainOpenAS2Server.start(MainOpenAS2Server.java:99)
[2018-06-06T08:17:14,245] [AS2-SERVER] [INFO ] [main] OpenAS2 Started -- com.helger.as2.app.MainOpenAS2Server.start(MainOpenAS2Server.java:106)
[2018-06-06T08:17:39,240] [AS2-SERVER] [INFO ] [Timer-3] processing /opt/openas2/data/toOpenAS2B/testfile.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:212)
[2018-06-06T08:17:39,330] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /opt/openas2/data/toOpenAS2B/testfile.txt [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:230)
[2018-06-06T08:17:39,330] [AS2-SERVER] [INFO ] [Timer-3] Submitting message [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:753)
[2018-06-06T08:17:39,407] [AS2-SERVER] [INFO ] [Timer-3] Connecting to https://10.0.2.15:81/exchange/hybris [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule._sendViaHTTP(AS2SenderModule.java:657)
[2018-06-06T08:17:39,471] [AS2-SERVER] [INFO ] [Timer-3] transferred 2783 bytes in 0.051 seconds at 53.297 KBps [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule._sendViaHTTP(AS2SenderModule.java:698)
[2018-06-06T08:17:39,759] [AS2-SERVER] [INFO ] [Timer-3] Start parsing MDN of [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.util.AS2Helper.parseMDN(AS2Helper.java:357)
[2018-06-06T08:17:39,804] [AS2-SERVER] [INFO ] [Timer-3] Successfully verified signature of MDN of message [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.util.AS2Helper.parseMDN(AS2Helper.java:382)
[2018-06-06T08:17:39,816] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /opt/openas2/data/mdn/2018/06/OpenAS2A-OpenAS2B-_ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2018-06-06T08:17:39,816] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveSyncMDN(AS2SenderModule.java:562)
[2018-06-06T08:17:39,817] [AS2-SERVER] [INFO ] [Timer-3] mic is matched, mic: OVpduWhKhgMsOIx2pxsZwg==, md5 [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveSyncMDN(AS2SenderModule.java:584)
[2018-06-06T08:17:39,818] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.sender.AS2SenderModule._sendViaHTTP(AS2SenderModule.java:725)
[2018-06-06T08:17:39,818] [AS2-SERVER] [INFO ] [Timer-3] deleted /opt/openas2/data/toOpenAS2B/testfile.txt [<ph-OpenAS2-06062018081739+0000-0454@OpenAS2A_OpenAS2B>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:299)

@Konfuzzyus
Copy link

I seem to have a similar problem and have traced it down to the Content-Type lines (note the newline after "sha-1;", this is a folded header):
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="----=_Part_2_1200151116.1527751914425"
In our case, the folded MDN header gets mangled by an intermediate proxy (nginx), dropping the boundary="----=_Part_2_1200151116.1527751914425" part and thus corrupting the entire message.

I am currently looking for a way to deactivate the folding feature, would appreciate pointers on where to look.

@Konfuzzyus
Copy link

It seems header unfolding is only applied to incoming http request headers and not on headers in responses. As a workaround, I replaced the following lines in com.helger.as2lib.util.http.AS2HttpResponseHandlerSocket

      // Add response headers
      for (final String sHeaderLine : aHeaders.getAllHeaderLines ())
        aOS.write ((sHeaderLine + CHttp.EOL).getBytes (CHttp.HTTP_CHARSET));

with

      // Add response headers
      for (Entry<String, ICommonsList<String>> entry : aHeaders.getAllHeaders().entrySet()) {
        for (String value : entry.getValue()) {
          String sHeaderLine = entry.getKey() + ": " + HttpHeaderMap.getUnifiedValue(value);
          aOS.write((sHeaderLine + CHttp.EOL).getBytes(CHttp.HTTP_CHARSET));
        }
      }

which is not brilliant, but it fixes the problem for now. Is there a better way to achieve this?

@phax
Copy link
Owner

phax commented Feb 28, 2019

I see the issue.
It's basically in class HttpHeaderMap that the method forEachHeaderLine is not doing value unification....
So instead of

public void forEachHeaderLine (@Nonnull final Consumer <? super String> aConsumer)
  {
    for (final Map.Entry <String, ICommonsList <String>> aEntry : m_aHeaders.entrySet ())
    {
      final String sKey = aEntry.getKey ();
      for (final String sValue : aEntry.getValue ())
        aConsumer.accept (sKey + ": " + sValue);
    }
  }

it should be

 public void forEachHeaderLine (@Nonnull final Consumer <? super String> aConsumer)
  {
    for (final Map.Entry <String, ICommonsList <String>> aEntry : m_aHeaders.entrySet ())
    {
      final String sKey = aEntry.getKey ();
      for (final String sValue : aEntry.getValue ())
        aConsumer.accept (sKey + ": " + getUnifiedValue (sValue));
    }
  }

@phax
Copy link
Owner

phax commented Mar 20, 2019

Release 4.2.2 will solve the multiline problem

@phax phax closed this as completed Mar 21, 2019
@Konfuzzyus
Copy link

Integrated and verified. Sincerely appreciate the effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants