[ https://issues.apache.org/jira/browse/CXF-8972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814778#comment-17814778 ]
Andriy Redko commented on CXF-8972: ----------------------------------- [~yoshani] it all depends on how you configure your server: if your server accept any content type (JAX-RS @Consumes annotation) than no, this is not expected. If your server accepts some but the client sends something the server does not understand than yes, it is expected. > Server exception raised when no Content-Type param provided > ----------------------------------------------------------- > > Key: CXF-8972 > URL: https://issues.apache.org/jira/browse/CXF-8972 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Reporter: Yoshani Ranaweera > Priority: Major > > If a request is sent without the Content-Type header parameter, a server > exception _javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media > Type_ is raised [1] and the below server error log is printed. > _{org.apache.cxf.jaxrs.utils.JAXRSUtils} - No message body reader has been > found for class java.lang.String, ContentType: application/octet-stream_ > Since this is a client error, it should not be handled as a server exception. > [1] > [https://github.com/apache/cxf/blob/main/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java#L1581] > -- This message was sent by Atlassian Jira (v8.20.10#820010)