You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2021/12/14 21:29:00 UTC
[jira] [Assigned] (CXF-8627) AttachmentDataSource should always returns a valid contentType
[ https://issues.apache.org/jira/browse/CXF-8627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Yue Fang reassigned CXF-8627:
-------------------------------------
Assignee: Freeman Yue Fang
> AttachmentDataSource should always returns a valid contentType
> --------------------------------------------------------------
>
> Key: CXF-8627
> URL: https://issues.apache.org/jira/browse/CXF-8627
> Project: CXF
> Issue Type: Improvement
> Reporter: Freeman Yue Fang
> Assignee: Freeman Yue Fang
> Priority: Major
>
> Per the javax.activation.DataSource API
> {code}
> /**
> * This method returns the MIME type of the data in the form of a
> * string. It should always return a valid type. It is suggested
> * that getContentType return "application/octet-stream" if the
> * DataSource implementation can not determine the data type.
> *
> * @return the MIME Type
> */
> public String getContentType();
> {code}
> So cxf AttachmentDataSource should also follow this. For the case that the incoming soap message with attachments, if the MIME part doesn't specify a content-type, use the general
> "application/octet-stream"
--
This message was sent by Atlassian Jira
(v8.20.1#820001)