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:56:08 UTC

[cxf] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new ee82eb5  [CXF-8380]MultipartProvider:ensure contentType is specified when initializing ByteDataSource
ee82eb5 is described below

commit ee82eb5e70fb9c059bafe2a35dda88da648b1f38
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
---
 .../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;