Freeman Yue Fang created CXF-8627:
-------------------------------------
Summary: 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
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)