From b22ca392b649bf88d74e60eb653840743e93fab9 Mon Sep 17 00:00:00 2001 From: jim-krueger Date: Sat, 4 Jan 2025 11:28:10 -0600 Subject: [PATCH] Add RESTEasy 4444 change to address issue --- .../providers/multipart/AbstractMultipartWriter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/io.openliberty.org.jboss.resteasy.common.ee10/src/org/jboss/resteasy/plugins/providers/multipart/AbstractMultipartWriter.java b/dev/io.openliberty.org.jboss.resteasy.common.ee10/src/org/jboss/resteasy/plugins/providers/multipart/AbstractMultipartWriter.java index 8c93171618f..54985b39de7 100644 --- a/dev/io.openliberty.org.jboss.resteasy.common.ee10/src/org/jboss/resteasy/plugins/providers/multipart/AbstractMultipartWriter.java +++ b/dev/io.openliberty.org.jboss.resteasy.common.ee10/src/org/jboss/resteasy/plugins/providers/multipart/AbstractMultipartWriter.java @@ -110,8 +110,13 @@ public void close() { // super.close(); } }; + //Liberty change start: Can be removed when https://github.com/resteasy/resteasy/pull/4444 is added + final HeaderFlushedOutputStream headerFlushedOutputStream = new HeaderFlushedOutputStream(headers, partStream); writer.writeTo(entity, entityType, entityGenericType, annotations, part.getMediaType(), headers, - new HeaderFlushedOutputStream(headers, partStream)); + headerFlushedOutputStream); + //Liberty change end + // Flush the headers for cases where the entity was empty + headerFlushedOutputStream.flushHeaders(); entityStream.write(LINE_SEPARATOR_BYTES); }