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 2020/11/25 14:58:02 UTC
[cxf] branch 3.4.x-fixes updated:
[CXF-8380]MultipartProvider:ensure contentType is specified when
initializing ByteDataSource
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.4.x-fixes by this push:
new 6b5c356 [CXF-8380]MultipartProvider:ensure contentType is specified when initializing ByteDataSource
6b5c356 is described below
commit 6b5c356e6dc85411961f548ba113b2261b388737
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Wed Nov 25 09:55:47 2020 -0500
[CXF-8380]MultipartProvider:ensure contentType is specified when initializing ByteDataSource
(cherry picked from commit ee82eb5e70fb9c059bafe2a35dda88da648b1f38)
---
.../src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java | 2 +-
1 file changed, 1 insertion(+), 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 76b7357..1c615c0 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
@@ -445,7 +445,7 @@ public class MultipartProvider extends AbstractConfigurableProvider
Type genericType,
Annotation[] anns,
MediaType contentType) {
- super(new ByteDataSource("1".getBytes()));
+ super(new ByteDataSource("1".getBytes(), contentType.toString()));
this.writer = writer;
this.obj = obj;
this.cls = cls;