Details
-
Bug
-
Resolution: Done
-
Major
-
13.0.0.Dev02
-
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.