From 42205860f59ab42c81a4280cc309554c64814412 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Fri, 26 Jan 2024 17:14:59 +0100 Subject: [PATCH] Added change from https://github.com/mmpaszkowski/phase4/commit/72673b63320a3f621acc4009f59e62319760d6d9 --- .../helger/phase4/servlet/AS4IncomingHandler.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/phase4-lib/src/main/java/com/helger/phase4/servlet/AS4IncomingHandler.java b/phase4-lib/src/main/java/com/helger/phase4/servlet/AS4IncomingHandler.java index 8b3b9c0ff..cdb7c3d6d 100644 --- a/phase4-lib/src/main/java/com/helger/phase4/servlet/AS4IncomingHandler.java +++ b/phase4-lib/src/main/java/com/helger/phase4/servlet/AS4IncomingHandler.java @@ -171,8 +171,8 @@ public static void parseAS4Message (@Nonnull final IAS4IncomingAttachmentFactory final IMimeType aPlainContentType = aContentType.getCopyWithoutParameters (); // Fallback to global dumper if none is provided - final IAS4IncomingDumper aRealIncomingDumper = aIncomingDumper != null ? aIncomingDumper : AS4DumpManager - .getIncomingDumper (); + final IAS4IncomingDumper aRealIncomingDumper = aIncomingDumper != null ? aIncomingDumper + : AS4DumpManager.getIncomingDumper (); Document aSoapDocument = null; ESoapVersion eSoapVersion = null; @@ -467,7 +467,8 @@ private static void _processSoapHeaderElements (@Nonnull final SOAPHeaderElement aHeader.getNode (), aIncomingAttachments, aState, - aProcessingErrorMessagesTarget).isSuccess ()) + aProcessingErrorMessagesTarget) + .isSuccess ()) { // Mark header as processed (for mustUnderstand check) aHeader.setProcessed (true); @@ -564,10 +565,13 @@ private static void _decompressAttachments (@Nonnull final ICommonsList x.getHref () != null && - x.getHref ().contains (sAttachmentContentID)); + (x.getHref ().equals (sAttachmentContentID) || + x.getHref () + .equals (MessageHelperMethods.PREFIX_CID + + sAttachmentContentID))); if (aPartInfo != null && aPartInfo.getPartProperties () != null) { - // Find MimeType property + // Find "MimeType" property final Ebms3Property aProperty = CollectionHelper.findFirst (aPartInfo.getPartProperties ().getProperty (), x -> x.getName () .equalsIgnoreCase (MessageHelperMethods.PART_PROPERTY_MIME_TYPE));