You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2026/01/09 22:25:48 UTC

(cxf) branch main updated: [CXF-9111]ensure we have correct Content-Disposition set per spec

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 2968735a216 [CXF-9111]ensure we have correct Content-Disposition set per spec
2968735a216 is described below

commit 2968735a216540871780e081103e9bb892a1fbb5
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri Jan 9 17:25:38 2026 -0500

    [CXF-9111]ensure we have correct Content-Disposition set per spec
---
 .../src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
index 7618e17d608..319bacf54f3 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
@@ -358,7 +358,8 @@ public class MultipartProvider extends AbstractConfigurableProvider
                                      att.getContentType().toString(), id);
             MediaType mediaType = httpHeaders.getMediaType();
             Attachment ret = null;
-            if (MediaType.MULTIPART_FORM_DATA_TYPE.isCompatible(mediaType)) {
+            if (MediaType.MULTIPART_FORM_DATA_TYPE.isCompatible(mediaType)
+                && att.getHeader("Content-Disposition") == null) {
                 ContentDisposition cd = new 
                     ContentDisposition("form-data;name=\"" 
                         + att.getContentId() + "\"");