Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8972

Server exception raised when no Content-Type param provided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • None
    • None
    • JAX-RS
    • None
    • Unknown

    Description

      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

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            yoshani Yoshani Ranaweera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: