Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13129

REST server should assume keys are text/plain by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 13.0.0.Dev03
    • 13.0.0.Dev02
    • REST
    • None

    Description

      For historical reasons, the REST server assumes keys are stored as java.lang.String when the Key-Content-Type header is not sent.

      Assuming a cache is configured to store textual content, e.g. text/plain, it will end up storing keys as java.lang.String and values as UTF-8 byte[].

      This cause issues with interoperability with Hot Rod clients dealing with text content, since the StringMarshaller always deal with byte[].

      Textual encodings (including json and xml) should be always stored as byte[] for maximum interoperability. Storing keys or values as java.lang.String should be reserved to application/x-java-object encoding.

      Attachments

        Activity

          People

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: