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

JAX-RS ClientProxy does not properly test consume types when setting request headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.3
    • 2.2.4, 2.3
    • JAX-RS
    • None

    Description

      On line 247 of org.apache.cxf.jaxrs.client.ClientProxyImpl in method setRequestHeaders() there is a test

      ori.getConsumeTypes().get(0).equals(MediaType.WILDCARD)

      which always fails since OperationResourceInfo.getConsumeTypes() returns a list of MediaType, but MediaType.WILDCARD is a String.

      Much further along in client code, this results in the JSONProvider rather than the JAXBElementProvider being used as the MessageWriter for content type /

      Attachments

        1. patch.diff
          0.9 kB
          Leonard Lu

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            lwlu98 Leonard Lu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: